34

What are the alternatives for SOAP development in C++? Which one do you prefer and is most supported/modern?

knaser
  • 1,421
  • 7
  • 19
  • 16

6 Answers6

17

Check out Apache Axis. That is my all times favorite SOAP implementation. It's SOAP done right! Exists for C++ and Java.
http://ws.apache.org/axis/
And in best traditions of Apache Foundation, it is FREE and OPENSOURCE.
So, enjoy!

Ma99uS
  • 10,605
  • 8
  • 32
  • 42
  • 1
    Does Axis support asynchronous queries? – Sean Edwards Jan 16 '09 at 15:37
  • 8
    I would also point you towards Axis2/C - which is the C version of the Axis2 architecture, which is way more flexible than Axis1 - see http://ws.apache.org/axis2/c/ – Andrew Borley Dec 08 '09 at 10:42
  • 10
    The apache link is still active, but none of the download mirror sites seem to work. Does anyone know if Axis is still supported/available? Looks like no... – Ampers4nd May 24 '13 at 16:14
  • I would discourage you from using Axis... The project seems dead and you'll be left with solving the bugs yourself when you find one (we had issues with proxies / HTTPS + the occasional crash). Better find a library that build SOAP messages, and send the request yourself with the system API (eg: WININET on Windows) – Gyum Fox Aug 03 '17 at 10:20
8

I had to make SOAP calls for a project a while ago and the only acceptable solution I found was GSOAP.

http://www.cs.fsu.edu/~engelen/soap.html

It supports both C and C++ code, although working with C++ is nicer and easier to understand. It worked ok although there was an incompatibility with our WCF web service which meant we had to manually edit the automagically generated source code.

JamieH
  • 4,788
  • 6
  • 28
  • 29
  • 7
    Gsoap is GPL, so that may not be the best choice. – ghord Apr 30 '14 at 07:30
  • 2
    I've used gsoap for several years and I can tell you that the older gsoap versions up to version 2.7.x are licensed under a commercial-friendly MPL-based license for the gsoap libraries and the soapcpp2 tool also, **but the wsdl2h tool and generated code is GPLv2** in all of the past and recent gsoap versions, so you probably need a proprietary license. The 2.8.x versions cover the newer soapcpp2 tool also under the GPLv2 and proprietary license. PS. my experience is that the support that you get with the proprietary license is excellent. – Dr. Alex RE Feb 13 '16 at 17:27
6

If you are writing for Windows, Microsoft has a utility that comes with the Windows 7 SDK (And visual studio 2013 and later) called WSUTIL. It generates C proxies given a WDSL file, as shown in this example.

http://msdn.microsoft.com/en-us/library/windows/desktop/gg288974.aspx

TJ Bandrowsky
  • 842
  • 8
  • 12
6

I stumbled on gsoap awhile ago, but I wasn't a huge fan of its interface and code generator. And as I remember it, the documentation is significantly lacking (or at least in a very difficult format).

Sometime in the near future, though, this library may be adding sockets support. At least, I suggested it to the developer some time ago and he seemed to think it was the idea, and a few months later an XML parser showed up in the API. I'm a big fan of that library, and would definitely use it more if it wasn't GPL.

fretje
  • 8,322
  • 2
  • 49
  • 61
Sean Edwards
  • 2,062
  • 1
  • 18
  • 19
5

KD Soap if you are in Qt C++. This is the URL https://www.kdab.com/kd-soap/

antonio
  • 477
  • 7
  • 18
3

SmartWin++ have a side-project called SmartSOAP which is pretty neat I think, it features a pretty complete stack starting from SocketStream, working its way up to HttpRequest/Response objects. Features a small (to the job) XML DOM class abstraction and goes up to SOAP. It even comes with a WSDL parser to create proxy classes for you. It heavily uses templates and STL. And is pretty awesome C++. Works on Windows Mobile...

Though it isn't extremely rich, doesn't feature stuff like SSL and such. But since the code is pure art I would guess it could easily be understood and extended upon yourself...

License is New BSD...

Disclaimer; I implemented it...

Michael Kohne
  • 11,888
  • 3
  • 47
  • 79
Thomas Hansen
  • 5,523
  • 1
  • 23
  • 28