Recently I have been testing the interoperability of our WCF services. Our services use wshttp bindings, custom security and some WCF extensions. My first target language is C++ and I’m starting off with VC++ in VS2005 with .net 3.0 on the machine.
VC++ does not have the same options for generating service references as C#. There seems to just be one method “Add Web Reference” that uses sproxy.exe behind the scenes. I tried this method first and ran into some problems. I then tried a rather interesting method where the proxy is generated as a C# class library that the C++ client uses to communicate with the web service.
- Create your C++ client in VS2005
- Add a new project to the solution of type C# class library
- In the C# project add a service reference to your web service
- in the C++ project add a reference to the C# project
- in the C++ project add an app.config file
- copy all the gubbins from the C# app.config into the C++ app.config
- follow this guidance to make your C++ client use the app.config