Calling .Net web services from Visual C++ (Soap Tool Kit)

Visual Studio365
Hi. I am new to this so this may be a dumb question:



I am trying to call a web service that is Written in VB.NET from my C++ dll.



here is what I did:



1. Create a sample web service (with helloworld function)

2. Create an empty ATL application (it compiled)

3. Added a reference to the wsdl document of the web service to the project.

4. tried to compile it and got an error:



syntax error : expecting a type specification near "HelloWorldResult"



error points to this line:



[id(4), helpstring("method HelloWorld")] HRESULT HelloWorld([out, retval]

HelloWorldResult *);



Here is the code that was generated by Soap Tool Kit when I added a reference:



// TestSoapTool.idl : IDL source for TestSoapTool.dll

//



// This file will be processed by the MIDL tool to

// produce the type library (TestSoapTool.tlb) and marshalling code.



import "oaidl.idl";

import "ocidl.idl";

[

object,

uuid(433144B5-225D-42D8-8E2C-875467ABE7FA),

dual,

helpstring("IService1SoapProxy Interface"),

pointer_default(unique)

]

interface IService1SoapProxy : IDispatch

{

[propget, id(1), helpstring("property URL")] HRESULT URL([out, retval]

BSTR *pVal);

[propput, id(1), helpstring("property URL")] HRESULT URL([in] BSTR newVal);

[propget, id(2), helpstring("property ProxyServerAddress")] HRESULT

ProxyServerAddress([out, retval] BSTR *pVal);

[propput, id(2), helpstring("property ProxyServerAddress")] HRESULT

ProxyServerAddress([in] BSTR newVal);

[propget, id(3), helpstring("property ProxyServerPort")] HRESULT

ProxyServerPort([out, retval] BSTR *pVal);

[propput, id(3), helpstring("property ProxyServerPort")] HRESULT

ProxyServerPort([in] BSTR newVal);

[id(4), helpstring("method HelloWorld")] HRESULT HelloWorld([out, retval]

HelloWorldResult *);

};



[

uuid(A07EF164-8E81-41FF-9D91-BD74F3C1F67E),

version(1.0),

helpstring("TestSoapTool 1.0 Type Library")

]

library TESTSOAPTOOLLib

{

importlib("stdole32.tlb");

importlib("stdole2.tlb");



[

uuid(C7AC7808-58F3-4109-B2D9-ACC22521C055),

helpstring("Service1SoapProxy Class")

]

coclass Service1SoapProxy

{

[default] interface IService1SoapProxy;

};

};



Before I go any further I wanted to know if it is even doable: calling

vb-based functions from c++ since all types are different. Is this a common

issue? Did I do anything wrong in my steps or is there anything I did not do?



Thanks for the help.


-