0

I have a c# WCF REST service running on Azure. I need to consume and longpoll the service from an unmanaged application.

The c++ app will not be running on the .NET framework.

Is there a best practice or library already out there that makes c++ consumption of WCF Services easy?

Jordan
  • 531
  • 2
  • 7
  • 17

2 Answers2

4

Microsoft is developing their Casablanca library for exactly this use case. You can get a dev preview version of it here: http://msdn.microsoft.com/en-us/devlabs/casablanca.aspx

Alternatively, here at work we will usually write a C# component that consumes a WCF service and expose the service's objects through COM to C++. We have also had some success more recently with KDSOAP, which would mean bringing Qt into your project.

Bret Kuhns
  • 4,034
  • 5
  • 31
  • 43
  • Thanks for your link Bret. Casablanca looks like it would be the perfect solution to my problem. Unfortunately it does not yet support HTTPS and is not recommended for production code :( – Jordan Aug 07 '12 at 14:56
  • In that case, I would take a look at http://stackoverflow.com/questions/450488/a-good-c-library-for-soap – Bret Kuhns Aug 07 '12 at 15:13
  • 1
    @Jordan Herb Sutter just linked to the video lecture "Casablanca: C++ on Azure" on his blog. I thought it may be a nice follow up for you if you're still looking into this. http://channel9.msdn.com/Events/TechEd/Australia/2012/AZR331 – Bret Kuhns Sep 21 '12 at 13:26
  • 1
    Thanks very much Bret. I will watch it this weekend. I went with using Libcurl to consume the service in the end. – Jordan Sep 21 '12 at 21:10
0

You could try to use gSOAP, it is a well known Toolkit for SOAP Web Services and XML-Based Applications, it is written in c and c++, to both: create and consume web services. It supports many standards of W3C and also can consume WCF. You can find it in gsoap2.sourceforge.net Best Regards

yosoy89
  • 163
  • 1
  • 2
  • 7