How to use MS SOAP toolkit? - c++

I know that the Microsoft SOAP toolkit has been deprecated for a while now (.NET has all this stuff built in) but I was wondering in anyone has a quick bit of info on setting up a simple app that uses it. I was referred to
http://www.devarticles.com/c/a/Cplusplus/Building-A-SOAP-Client-With-Visual-C-plus/
but the service in the example is no longer functioning and I can't seem to find any documentation online.
I've looked into gSoap, but it seems overly complicated for what I have to do and despite not being able to get it to work, the SOAP toolkit seems (relatively) elegant.

Don't do it. It's 5 years deprecated, and it was 2 years out of date when it became deprecated. Don't.
Assuming you are running on Windows (since you mentioned the MS SOAP Toolkit), use the imminently-arriving WWSAPI instead.
Also see this post:
http://blogs.msdn.com/vcblog/archive/2009/03/31/interested-in-using-web-services-in-your-native-c-c-code.aspx
EDIT: If you want something more basic, you can use MSXML and build your SOAP requests manually.

Really. "Deprecated" is not the word for it. It's at the top of my list of obsolete web service technologies:
SOAP Toolkit
WSE 1.0
WSE 2.0
WSE 3.0
ASMX - not quite obsolete. Just "legacy".

Related

Looking for examples or guides or links to understand JAX-WS 1.2 project

I have got an opportunity to work on a legacy web service project
which has been written 10 to 12 years before . I happily took this
assignment as i really wanted to check out how much effort the
developers had put decades before to write web services without the
advanced framework which we have nowadays . I really think they had
put a lot !!! coz the pkg has so many classes which i dont even
understand what is it ... It has BO ,PO , WSAO classes , CXF mapping ,
marshalling and unmarshalling .. So i want help from senior
developers here who have worked on web services decades before coz i
couldn't find any example in net really , all seems to be archived or
Page not found link .so please provide me any links or examples to
understand JAX-WS 1.2 , Webservice client - service . It might not be
a coding question but a question which would really others who are
willing to work on legacy projects .Thanks in Advance
You might start with just the "spec" jax-ws classes first. Various implementations have a lot of other, non-spec features that aren't portable and go beyond the spec, I'd save those for later. There are parts of jax-ws that are "off the beaten path", (handlers, low level api's, attachments, etc.) you can save those for later too.
This might be a good place to start: https://docs.oracle.com/javaee/6/tutorial/doc/bnayl.html
Java 6 through 8 contains jax-ws (unfortunately it's removed starting with java11) so you don't need an app server to experiment with it, just a java 8 jdk.
This seems to be a pretty good article on using jax-ws with just a jdk:
https://www.javaworld.com/article/3215966/web-services-in-java-se-part-2-creating-soap-web-services.html
The spec, JSR-224, is a good explanation, but it's not light reading, and you have to accept their license.
https://jcp.org/en/jsr/detail?id=224

Web Services using C++

I am building a server-client application that involves heavy signal processing (e.g. FFT). I have a working application written in C++/Qt, where everything (signal processing and other calculations) is done in client and server just sends raw data. Now I feel it would be easier to implement these features on the server. So, that maintenance becomes easier.
As I am doing signal processing, I think I should stick to C++ for performance. But I am open to new ideas.
Constraints:
I need type checking so javascript is out of discussion.
Scaling includes adding more server and each server will have at the max
10-12 users. So, Hardware cost is important. I cannot use x number of
i7 processors.
No option of using cloud services.
So, right now my question is as follows:
How can I create web services using C++ for Linux server? (Although cross platform is not important, I would appreciate if I can achieve it.)
EDIT [02:09:2015]
Right now, I think the choice is between poco and C++ Rest SDK. I feel I should go for C++ Rest SDK. Mainly because it has only those features that I need. And Also it is supported by microsoft and uses boost internally. So, I feel in future, this might be well integreated with standard.
You could use cross-platform Poco library to implement HTTP server, it is really straightforward with this framework, and they have a lot of examples. You can also use JSON serialization (like rapidjson library) to implement REST service on top of HTTP - this way your Web service will be accesable by most of the modern Web frameworks.
You might want to take a look at the C++ Rest SDK, an open source, cross platform API from Microsoft.
Like #nogard suggested, I also recommend POCO for now. It's the most serious and feature-full solution. Given you mentioned Qt, I suggest you to take a look at Tufão.
EDIT:
I forgot to mention one comparison of mine on the C++ HTTP server frameworks.
If you directly handle HTTP requests, you might loose the functionality what Web Servers does well what it was build to do. I had a similar issue, what I did was wrap up my Qt c++ code inside a PHP extension. In your case you can do the same. Wrap your logic inside what ever technology you are about to use, doesn't matter it's PHP, net , Java or anything else.

Getting Started with Axis/C MIME/DIME and MTOM

I am about to start some work on Axis/C. I have a fair idea of C and webservices separately. I am also fairly ok with *nix.
Can someone tell me about the complexity related to creating a webservice with support for MIME/DIME and MTOM with Axis/C? The webservice will be invoked from Java as well as C++ clients.
Does Axis/C have any known limitations in this regard? What are the best starting points for learning Axis/C in general and MTOM et al. support in particular.
I would advise against Apache Axis/C or Axis2c for that matter. Both these projects lack active development and member contribution. Last Axis2c release was in 2009 and Axis/c release page link doesn't even work.
I have developed a reasonably complex web-services implementation (both client and server), and I have ran into these issues:
Documentation is just OK. Nothing great.
Returning status codes of your choice is not easy.
Some HTTP verbs have bugs - for example I couldn't get DELETE to work.
I have faced issues with the supplied XML library guththila. libxml worked better for me.
It's hard to build complex REST routes for your application.
Handling incoming XML objects is quite cumbersome and inconvenient. I ended up writing a library of convenience functions.
JSON support is missing.
Your application will tend to become large with each server-side service implementation running into at lease a hundred lines of code.
WSO2 seems to be another option as far as web-services in C is concerned. The Axis2C team is mostly full of WSO2 people anyways. I haven't tried it though, but definitely looks more promising than Axis2C.
I had to modify the code to get it axis 1 to compile on fedora 13 + I believe I had to add a pure virtual some where in the code

C++ Library for implementing a web services api over legacy code?

Does anyone know of any really good C++ Libraries for implementing a web services api over top of existing legacy code?
I've got two portions that are in need of it:
An old-school client/server api (No, not web based, that's the problem)
An old cgi application that it integrates with the client and server.
Let me know if you've had any luck in the past implementing something like this using the library.
Microsoft has put out native code webservices API (WWSAPI) that looks pretty decent. I haven't had a chance to use it yet. We had originally ignored it, since it required Windows 7 or Server 2008, but they've finally released a runtime library for older OSs.
I would advise staying away from Microsoft's old SOAP SDK. For one, it's been deprecated; two, it's not terribly easy to distribute; and three, it's terrible to code for compared to the .NET offerings.
What we've done is written a bit of C++\CLI to interface our existing C++ codebase with .NETs webservice framework. This turned out to be remarkably easy. .NET will generate all the classes and boilerplate code you need based of of a WSDL file. Then you just write some C++\CLI code to handle the incoming data as managed classes and fill in some managed classes as responses.
You can use the Apache AXIS/C interface to build a web services interface. It has plugins for Apache and IIS (and I think FastCGI), and lets you talk web services to your legacy code.
I used gSOAP in a project and it was quite straightforward. Compared to Axis/C, I found it easier to learn and use. I never used POCO, can't give you an opinion, but it's gaining popularity recently. This is the link for gSOAP
http://www.cs.fsu.edu/~engelen/soap.html

C++ web service framework

We are looking for a C++ Soap web services framework that support RPC, preferably open source.
Any recommendations?
WSO2 Web Services Framework for C++ (WSO2 WSF/C++), a binding of WSO2 WSF/C into C++ is a C++ extension for consuming Web Services in C++.
http://wso2.org/projects/wsf/cpp
Apache Axis is an open source, XML based Web service framework. It consists of a Java and a C++ implementation of the SOAP server, and various utilities and APIs for generating and deploying Web service applications.
http://ws.apache.org/axis/
http://code.google.com/p/staff/
Staff is Web Service Framework for C++ (service/component and client-side)/JavaScript(client-side) based on Apache Axis2/C.
Open-source, released with Apache License V2.0.
Try the ffead-cpp framework, it provides in-built web-service support, rest, json and many other useful features.
We are using EasySoap (http://easysoap.sourceforge.net/)
While not FOSS another library is ATL Server library from Microsoft.
It is C++ template based with some proprietary attributes by Microsoft. i.e. not standard C++
You can check out xmlbeansxx. This is a kind of lightweight, low level solution, compared to complete frameworks. This has advantages in some cases.
Invoking SOAP WebServices using xmlbeansxx Article
Code example is here:
WsClient.cpp.
You could try gSOAP. Available under GPL and commercial licences.
I have used SWIG to make an interface from C++ to Java or Python and then used the typical web interface support for those languages.
Since Java and Python have reflection the web services frameworks that exist for them have a much easier time passing data around.
Threading wise if your C++ code is thread safe you can let the Java server manage the creation of threads for concurrent requests etc. and just call into your C++ code using JNI.
As a bonus you can test your C++ code from Python using these same SWIG interfaces.
I think the way to go is to write your service in C++ (I am assuming you did all the homework and there is a good reason you want to write in C++) and then front it using an RPC server. Use something like Thrift or Protobufs for a fast RPC implementation.
Now write your web frontend in the language of your choice - python would be mine - and make RPC calls to do all your heavy lifting.
POCO Remoting gives you a very simple way of creating web services in C++ by just annotating C++ class definitions with special comments and running a code generator over it. It's commercial, but delivered with full source code. A free eval version is available. Runs on Windows, Linux, Mac OS X, etc.
I concur with imjorge's answer and add that there's a C/C++ version of the Axis2 framework (a more flexible, extensible Axis) that does SOAP via RPC and all sorts of stuff including a bunch of the WS-* specs.
http://ws.apache.org/axis2/c/
Apache axis-c:
Simple to use, but seems abandoned.. not even download pages is working for several months
WSOF WSFCPP:
Fast quickstart dev, both binded or no-binded implementation, based on Apache AxisC and it seems most of the current developers of Apache Axis is from WSOF company. Besides the Great potential I've detected a memory leak.
I'm currently using Gsoap and It has very good performance.
Gsoap "mixed notation" between old c style and some (bad?) practices for C++ bothers me some.. but this is only code-furniture.
POCO:
Is a full-feature, modern (java?) like library. It is open source software, licensed under the Boost Software License 1.0. You'll have to write some things from scrach, but with great support, utility classes and etc great library.. Innovations from c++11+ with all boost initiatives + POCO + a new Build/Dependency system more "gradle like" will certainly bring c++ to new areas of development.