How to Consume WebService via unmanaged C++
Someone asked me how to consume webservice using unmanaged c++ client.
1. Open your C++ project in Visual Studio 2003/2005
2. Right click on the project name in the solution explorer and add reference to the web service
This operation will create the web service proxy and add if to your c++ solution.
3. Call the web service
Assuming that you want to consume the basic HelloWorld webservice these are the lines that you need to add to your C++ app:
Service::CService proxy;
BSTR Result=NULL;
HRESULT hr = proxy.HelloWorld(&Result);
MessageBox(0,Result,CComBSTR("Hello World Result"),0);