Firstly - you implied you had a C# client for your COM server, not for some web-service. This would appear to be incorrect...
Thomas_Mathews wrote:
I am writing a client in c++ to invoke that webservice using IDispatch
Yeah...don't think that's going to work - the CP article you reference doesn't use IDispatch to call web-services, and really, IDispatch isn't for calling web services.
Thomas_Mathews wrote:
This is structure we pass in c# for calling method [System.Xml.Serialization.XmlTypeAttribute] public class BLOB { /// public string contentType; [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] public System.Byte[] binaryData; public string ID; public string URL; }
The "[System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]" gives it away - this structure is sent to the web-service by serializing the structure contents as a chunk of XML. That implies to me that the web-service is probably using SOAP - maybe you could use something like gSOAP[^] to write your C++ client? Do you have a WSDL file that defines the web-service interface?
Thomas_Mathews wrote:
If above is complex is anyone know how to pass structure like below in IDispatch's Invoke() method. The COM Server is third party. struct tag{ char str[100]; void *p; char str1[300]; }
Strikes me that this is a completely separate problem from the one above - the only connection is "I have a method call that I wish to serialize between a client and a remote (to some extent) server". Now. This third-party COM server. It must define its interface somewhere. There must be something that tells you what methods it will understand on its IDispatch interface. If you don't have an IDL file, you ought to have a type library (it's usually embedded in the server somehow). Maybe you could try generating an interface to the COM server using #import[^], specifying the COM server DLL or EXE as the thing you're importing? Also - you cannot<