VS2010 & native C++ Web service
In VS2008 there was support for calling/consuming native C++ web services via atlsoap. In VS2010 this feature has been removed.
atlsoap is pretty much dead, the project on codeplex isn't really being updated, it's missing a lot of features.
With VS2011 having no built in support at all for C++ webs services... What's the current recommended way to go for this ?
* The project(s) are Native C++ MFC, consisting of several extention DLL's and exe's using those.
* WSDL based remote webservices (we don't own the webservices, we can't change them).
* Some of our clients need to be able to connect through authenticating network proxy servers (which atlsoap didn't do, so it's an extra good excuse to not continue that road).
* It needs to work on Windows XP, Vista, 7, 2008
In short. How does one use/call/consume internet web services from C++ in VS2011 ?
Re: VS2010 & native C++ Web service
Let me share 3 ways to use web services from C++ known to me:
1. Windows Web Services API. Also there is an article available. The problem is that WWSAPI is available only starting from Windows 7.
2. Using third party open source libraries, such as gSOAP.
3. Implement SOAP request/response processing manually, i.e. generate SOAP request XML based on specific service your application supports (it depends on WSDL) and send it over HTTP or HTTPS protocols. Also the handling of response is needed. An XML parser can be used for that (MSXML can be considered for Windows platforms).
We use this approach in one of our projects for simple Web Service support (the Web service itself WSDL doesn't change frequently). This 3-rd way is rather a workaround, than a solution, but sometimes it can be used.
Regards,
Armen.
Re: VS2010 & native C++ Web service
The fourth approach could be implementing managed C++ Web Client. Wsdl tool is able to generate a client class for C++, see help for /language.
Quote:
/language:<language>
The language to use for the generated proxy class. Choose from 'CS',
'VB', 'JS', 'VJS', 'CPP' or provide a fully-qualified name for a class
implementing System.CodeDom.Compiler.CodeDomProvider. The default
language is 'CS' (CSharp). Short form is '/l:'.
Or make it C# module. :)