C++ Soap Toolkits - c++

I am looking for a SOAP toolkit which I can use with C++ language on Linux system.I have taken a look at AXIS2C and i find it poorly documented. gSoap unfortunately requires a license, so are there any others which are out there?

The only SOAP toolkit that I've used for C++ is QtSoap which is fairly low level, only supports SOAP 1.1, and is Qt specific.
gSOAP can be used commercially without a license inasmuch as you aren't using the wsdl2h binary and associated generated code.
There are a number of others that you could investigate.
Also any other approaches to achive the same (consume web services) would be appreciated.. As of now i understand that only way out is via a toolkit
Since most web services are "just" XML, you don't need much in the way of a supporting library if you're willing to work through some of the protocol requirements. If your needs are simple, this may be sufficient.
Another option is to use bindings to Java or .NET where plenty of supporting libraries are available.

Related

Library for developing XMPP server in c++ or delphi?

I have to develop a simple XMPP server that will be included in a commercial project. I guess there is no server available that can be purchased with a royalty-free-license and that enables me to do the configuration and user management and the authentication from my own code.
The languages I can use are Delphi and C++.
I've already looked at the libraries listed at xmpp.org, but most of them seem to be client-only libraries or (as e.g. QXmpp) require QT which I have no experience of and consideres it to be a pure GUI framework.
Can anybody suggest a library I should take a closer look at? Does it make sense to familiarize myself with QT for this purpose (writing xmpp server;no GUI)?
Or is it better to just catch a stream parser (suggestions?) and code it myself?
Thanks!
Edit: The only library I could find for Delphi, IP*Works is a pure client library. I'm evaluation QXmpp now.
For the Delphi part of my question: I didn't find a library I think that is suitable for building a server.
For the C++ part, I think this post Non GPL C/C++ XMPP client library for embedded Linux (though it is for embedded and client) is answering my questions:
Because Qt provides XML parser and signal/slot framework. XMPP requires XML parser, and signal/slot framework makes your life easier. If you try implementing entire XMPP with all extensions in OOP fashion, you'll need something similar to Qt.
and
Advice: when it comes to C++, there aren't many good xmpp libraries available.
So I think, QXmpp seems to be a good solution.
For other people searchig for this topic:
IMHO the documentation (especially for the server part) is a bit poor. The server example distributed with the qxmpp library is (of course) very basic: It is transporting chat messages. Distributing presence information, roster, subscription handling has to be implemented by you via extensions (inheriting QXmppServerExtension overwriting at least virtual function handleStanza). Don't parse the presence or iq stanzas in your own code. For the more common stanzas the libarary has classes implemented QXmppPresence, QXmppRosterIq etc.) that also can be used in your extension.

WCF-like Native C++ Library

I am looking for a library for native C++ (library source code has to be gcc compatible and portable across Linux and Windows) that does what WCF does in its very basic form - i.e. OperationContracts and DataContracts in a client-server environment, with data exchanges in binary format (binary serialization).
Ideally I'd like to use a library to achieve this. So if there's a library already available that compiles OperationContracts and DataContracts into rich C++ classes with metadata for reflection which can be consumed in our code and with client-server TCP communications built-in (i.e. a rudimentary implementation of WCF's functionality without the need to be compatible with WCF at all), please point me to it.
If not, implementing them myself (unlikely due to time constraints), I could use boost::serialization for DataContracts but how would I implement OperationContracts?
It's not necessarily compatible with gcc--so it's somewhat tangential to the precise question asked here--but I'd like to include a reference to the Windows Web Services API, Microsoft's native-code counterpart to WCF (for Windows systems).
From this secondary article:
WWS is designed from the ground up to be a completely native-code implementation of SOAP, including support for many of the WS-* protocols. WWS is, strictly speaking, exposed through a C API, making interoperability with other languages and runtimes very straightforward, but it is the C++ developer who will likely benefit the most.
I have found one that fits the purpose called "RCF" (Remote Call Framework) by Delta V Software. It's open source (GPLv2 or US$195 closed source). So far in my testing, it's working very well. According to the site, companies like HP, Ericsson and Siemens are users of the library.
Apache Thrift is another option you might consider,
http://en.wikipedia.org/wiki/Apache_Thrift

Thrift vs Protocol buffers [duplicate]

This question already has answers here:
Biggest differences of Thrift vs Protocol Buffers? [closed]
(15 answers)
Closed 7 years ago.
I've been using PB for quite a while now, but, Thrift has constantly been at the back of my mind.
The primary advantages of thrift, as I see it are:
Native collections (i.e, vector, set etc) vs PBs repeated providing functionality similar to, but not quite like (no iterators unless you dig into RepeatedField which the documentation states "shouldn't be required in most cases").
A decent RPC implementation provided, instead of just hooks to plug your own in.
More officially supported languages (PB offers "official" support for Java, C++, Python)
The cons of Thrift:
The RPC implementation means I can't plug in my own (for example) encryption/authentication layer on top.
Windows support doesn't seem to be great.
PB definitely seems to have, if not better, more accessible documentation.
Neutral:
Unknown size of .lib/.dll on Windows (Thrift).
Large size of .lib on Windows (PB, but it does offer a -lite which is significantly smaller).
Speed wise, they both seem to be similar.
I'm not quite ready to take the plunge and switch to Thrift yet, can anyone offer me more pros/cons, or reasons to go one way or the other?
Thanks!
As I've said as "Biggest differences of Thrift vs Protocol Buffers?" topic :
Referring to Thrift vs Protobuf vs JSON comparison :
C++, Python, Java - in-box support in Protobuf and Thrift.
Protobuf support for other languages (including Lua, Matlab, Ruby, Perl, R, Php, OCaml, Mercury, Erlang, Go, D, Lisp) is available as Third Party Addons (btw. Here is SWI-Prolog support).
Protobuf has much better documentation and plenty of examples.
Protobuf objects are smaller
Protobuf is faster when unsing "optimize_for = SPEED"
Thrift has integrated RPC implementation, while for Protobuf RPC solutions are separated, but available (like Zeroc ICE ).
Protobuf is released under BSD-style license
Thrift is released under Apache license
Additionally, there are plenty of interesting additional tools available for those solutions, which might decide. Here are examples for Protobuf: Protobuf-wireshark , protobufeditor.
You might want to analyse your need first:
Do you need a protocol-agnostic format? For example, do you want to implement a custom protocol or need 100% portability? In such a case use PB.
If you are fine with the default protocol of Thrift, and you need a protocol to begin with, by all means, go with Thrift.
Hope this helps.
Our project's main reason to stick with Thrift over protocol buffers was that protocol buffers don't auto-generate a complete RPC server, and existing solutions for PB seemed to all be fairly unstable. Just my $0.02.
You need to specify your use case(s) in detail. Else this is a "Which is better, a car or a truck?" question.

What is the best way to access SOAP WebServices from portable native code?

I need to access a SOAP webservice (written in .NET with MS SQL backend, FWIW) from several different platforms, so my common denominator is native C++. Is there a portable library for this or I should roll my own solution?
To do SOAP in C++ you need both a networking and an XML/SOAP library. These aren't easy to find, especially if cross-platform is needed.
I would start from libcurl. There seems to be a SOAP example available.
It's possible that using Java rather than C++ might actually be easier. Java does run in lots of places and has quite nice Web Service client libraries.
Is that worth a look?

A Good C++ Library for SOAP

What are the alternatives for SOAP development in C++? Which one do you prefer and is most supported/modern?
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!
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.
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.
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
KD Soap if you are in Qt C++. This is the URL
https://www.kdab.com/kd-soap/
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...