Unable to cast COM object of type 'System.__ComObject' to interface type 'System.ICon

TimTree

New member
Joined
Feb 27, 2007
Messages
3
Programming Experience
5-10
Apologies if this is in the wrong area.

I am currently messing around with a .NET method that creates a SOAP(XML) message and sends it off.
However i am receiving a an error message which I have no idea how to solve.
The code below is ran :-
VB.NET:
Try
Reader = New SoapReader
Reader.Load(Connector.OutputStream)
parseResponse = Convert.ToInt32(Reader.DOM.parseError)
at the point of the parseResponse line I get the following error:-
Unable to cast COM object of type 'System.__ComObject' to interface type 'System.IConvertible'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{805E3B62-B5E9-393D-8941-377D8BF4556B}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Any Ideas what this is guys ?
Thanks
Tim.
 
Last edited by a moderator:
parseError is type MSXML2.IXMLDOMParseError, perhaps it is the integer property errorCode you're interested in from this object or other properties? The intellisense in code editor lists them all when you write the code, you can also use the Object Browser to navigate the libraries. But why do you use the MSSoapLib to access web service? Visual Studio integrates well and easy with webservices, just add WebReference for the consumer and create an instance of the generated proxy class to start interacting with the service without need to handle the low level soap at all. See for example the "Using a Web Service" section of this tutorial.
 
Back
Top