WebServices/SOAP for C++ - c++

I've spent so many time trying to find a good Open Source tool to integrate webservices with c/c++.
GSOAP: I cant use it because the license, if you use its tool to generate code by the WSDL, GPL license is not avaiable.
WWSAPI: Appart that is only for Windows, if you read documentation carefully, when you need the redistributables, you have to mail to a Microsoft email, so, I think I should have to pay too.
Axis2C: Project is not maintained (at all) and if you want to use the wsdl to code tool, you are going to get into a lot of memory leaks.
Reading other posts here, someone was speaking about axis2c but using SVC Client API instead of generating code tool. I am using it, and it works, but my question is, it is worth to use SVC Client API, instead of developing your own socket setting the envelope before the xml? I'm not an SOAP expert, could SVC Client API save me time? Its AXIS2c with SVC Client API hiding me more WebServices concepts that I should implement if I make manually?
Thanks in advance!

Related

Creating a SOAP client in C++ (VS 2010) without any third party library like gSOAP

We need to make SOAP requests in C++. Basically a SOAP client. The catch is that we DON'T want to use any third party library like gSOAP. Reason being that the transactions are finance related. We need to write the complete code ourselves.
Please suggest ideas towards it. I believe that this is going to be very complex.
Any ideas towards this would be of great help. Our environment is C++ on windows (VS 2010) Please note that for now, we can assume that there is a single SOAP based web service (written in C#) for which we need to do it. Therefore, any complexity related to generalizing this SOAP client can be left out for now.
Ultimately a SOAP request is a HTTP POST of XML data. You can build the XML yourself and use IWinHttpRequest to post that data to the server.

APIs and tools for google-drive in c++/qt

Are there any API's for google-drive in C++/Qt OR Any tool like Insync which is free for use and can be used for accessing and managing on google-drive.
I have tried using qt-google-drive by ics but it's still under development.
You can use Google Drive from essentially anything that can generate HTTP requests (and, obviously, use the reply data).
The Google Drive SDK doesn't include any examples written in C++, but as you can see in the reference section, it's all done with fairly normal HTTP GETs, POSTs, etc.

swig, soap or restful for my c/c++ library

I have a library/API that is completely built with C/C++ for over 10 years (under Linux). Now I want to export the API as a web service for other web projects use. I search for the web and narrow down to the following 3 chooses:
use SWIG to export the API to PHP or other script/web base language
use gSOAP to export the API as SOAP protocol
export the API as RESTful service (I can't find any exist framework, any suggestions?)
I want to compare them in terms of
stability
easy of use
performance
SWIG seems easy to use buy I am not sure the stability of it.
gSOAP seems very stable but a bit difficult to use and setup.
Any suggestion?
I personally used WSO2-WSF-CPP which is a C++ layer on top of AXIS2/2 to export legacy C++ code as web-service.
I tried back then gSOAP which worked quite well, but for stability and deployment reasons I choose WSO2, since AXIS2/C can be deployed easily as a module of the well know Apache2 HTTP server.
For the ease of use requirement I don't know if you plan to take WSDL file as a template to generate source code skeleton, but you can forget about this feature of the WSO2 package ... It seems to have been deprecated for a long time and the generated code is way too ugly to be maintained by hand.
Although doing a code generator yourself could be a good idea depending on the complexity and the amount of services you have. I recommend it! I did that and creating/building/generating services is quite straightforward now.
Another thing to notice about the WSO2 web services is that it's simple to build out of the box, and comes with stand-alone server to develop and test with. It was quite helpful (even if I am quite sure any decent web-service platform provides this kind of stuff like gSOAP does).

How to connect a C++ program to a WCF Service?

In the place I work there are some software written in C# and some written in C++ (the most important ones). Some time ago we decided it would be a good idea to track any possible problem in the software, by sending stack trace and exception information over a web service. So I came with a WCF Service, that gets the information and store them on a database and send an automatic e-mail. It worked, we had to secure it through password, it's done, but now I want our other software, the one written in C++, to use this webservice (this software is used both on windows and linux, so we can't just make a call to another software in the user machine).
I've googled about it, and found this tutorial on how to use gSOAP, which so far didn't help me very much (lots of errors, it is not very detailed, and the web.config file is impossible to read). I was wondering if is there any other way to achieve this. In adition, since I'm using authentication on my webservice, it now has a wsHttpBinding (which AFAIK isn't supported by gSOAP).
Can you guys help me out?
Since your WCF service is in C# with .NET, and the only issue is getting the C++ application to be able to talk to it, one way is to follow the advice in REST / SOAP Endpoints for a WCF service and related articles.
Your C# programs continue to have the full SOAP access to your service.
Your C++ programs could do something like this for REST access:
"Browse" to the HTTP GET URL for the service command you wanted.
Then toss (or parse and use) whatever response came back.
It is a pretty minimal change to your WCF service to offer both SOAP and REST.
The REST ability opens your service to JavaScript as well as C++ clients.
You may need to restrict the interface to simple data, or class objects that are easy to parse in C++.
Will the machines running the C++ applications have the .NET Framework installed?
Check out: Create WCF service for unmanaged C++ clients

Can WSDL 2.0 (or similar) be used to generate a web service boilerplate?

I apologize if if this is a bonehead question.
I've used WSDL to generate code to talk to web services, but my question is about using it to actually generate web services.
Let's say that I have a device that is going to communicate with a web service. The web service in question doesn't actually exist and is out of my control. That is, the party wishing to process messages from my device must implement the service.
The service in this case is extremely basic. It's simply a small collection of methods that receive messages and return status codes. It's basically a middleman between my device and 3rd party software.
It would be really cool if I could supply something like a WSDL 2.0 document that they could then use to actually generate the boilerplate code for the service and methods they are required to implement...preferably in Java (Axis) and .NET friendly frameworks.
In other words, I want to use WSDL to generate the service, not the client. Or maybe I don't want WSDL at all. What techniques would you recommend to make this as painless as possible?
SvcUtil.exe for the Windows Communication Foundation technology in .NET 3.0+ can do some of what you're asking, i.e. generation of contract interfaces and basic client code using a predetermined WSDL as input.
Now, this will not fully generate the actual service, just the contract interface. I don't know of an easy way to do this as it is probably not a very common case. Essentially what you're asking is a slightly more automated version of what Visual Studio does when you create a class and use the "Implement interface" feature (which I believe is accomplished mostly through VS templates).