Simplest WCF service to be consumed by C++
I'm a complete newbie regarding network stuff, but here are two scenarios I'd like to accomplish:
- I have a machine running a WCF service
- Scenario 1: on the same machine, I have a C++ app that needs to get data from that service
- Scenario 2: on a different machine, I have a C++ app that needs to get data from that service
The data that is exchanged will typically be around 1-10KB, but the method of transfer needs to also be able to handle big开发者_C百科ger data exchanges (1-10MB).
What kind of configuration should I use on the WCF service to make this task as easy as possible?
If you want a service that can be accessed by non .NET code, the appropriate binding to use is basicHttpBinding. This way you will generate a service that adheres to the standard published web service protocol.
If you are writing a client in unmanaged C++, calling a web service is supported by ATL. See http://msdn.microsoft.com/en-us/library/2k53kft2(VS.80).aspx for a walkthrough.
精彩评论