Generating WSDL from C++ (MFC Classes) - web-services

I amd working on piece of requirement in which I need to design an interface/class in C++ which contains some methods or variable. And these methods I need to call for generating WSDL, which I will be using in some other middleware. I need to understand how C++ Code can be utilized for generating services or is there any third party available for generating WSDL for C++ code. Any kind of help is highly appreciable.

This library
https://code.google.com/p/staff/
is for "Staff is a complete solution for building and deploying Web services in C++."
Maybe it helps.

Related

iOS framework with multiple, distinct set of headers

I got a very strange request from one of my customers (at least according to my current knowledge). I have to build an iOS framework, which main purpose is to wrap a C/C++ library with Obj-C code, to hide some of its general API and expose only what my customer want me to expose via Obj-C. Now, here comes the tricky part. This framework is going to be a dependency for an application (objects/methods/functions/whatever should be accessible from , i.e. view controllers) and for another framework. Is it possible to build this framework in a way that expose only part of an API to an application and part of API to another framework which is going to use it internally?
According to my knowledge it is impossible and framework can expose only one API, which is common to every possible consumer/user. However my knowledge might not be complete in this topic.
Additional question: can I expose both Obj-C and C API from a single framework. I assume I can, but just want to make sure.
Please don't ask about rationale behind this idea. This is a requirement I got and have to investigate so I can't provide any sensible justification at the moment.
Thanks!

How to Compose OSGi Based project with C++ based project?

I am extending a project that it has been initiated with C++ language. Now I am developing a new part of the project. and it will be based on OSGi (Java).
Now I want to know is there any stable method to compose the old project with new part? Is there any steps that can convert C++ objects to OSGi bundles (or with similar structure and metadata)? Or is there any way to have communication between them?
Although it isn't C++, but plain C, you might check out Apache Celix. Apache Celix is an implementation of the OSGi specification in C, without a dependency to any Java implementation or such. Currently Celix is still in the incubation phase.
Regarding communication between C and Java, one of the items on the (short term) todo list of Celix is an implementation of the OSGi Remote Services. We intend to use hessian as implementation since it already exists in many other languages, is relatively simple, binary and compact. This provides a solution for distributed systems as well as C - Java communication.
I don't think there is any alternative to JNI, the Java-Native Interface.
You could take a look at the BUNDLE_NATIVECODE header and the related descriptions in the core specification (section 3.10). Still, you'll have to whip up a lot of interfaces using JNI then.
FYI - For C <-> Java communication the Paremus' OSGi Remote Service implementation (see Nimble) supports an Avro distribution provider.

C++ Soap Toolkits

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.

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...