views:

2642

answers:

14

We are looking for a C++ Soap web services framework that support RPC, preferably open source. Any recommendations?

+1  A: 

You could try gSOAP. Available under GPL and commercial licences.

Nick
A: 

Do You REALLY need it to be C++? If so you may think of integrating it with some other language that has close-to-native support for some Web Services standars.

However, you should look into REST (http://w.cx/d39d11) for web/internet-based apps. It's probably the best option out there to get code out fast.

Vasco Duarte
I could not follow your link, can you please edit?
Raz
+5  A: 

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/

smink
After trying several different packages we found Axis to be the most comprehensive, easy to use lib.
Raz
A: 

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.

James Dean
A: 

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.

A: 

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.

A: 

"web services" is not a well defined term.

/Allan

Allan Wind
A: 

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/

ajborley
+2  A: 

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.

A: 

is it possible to write a webservice only in C/ C++ without using java and .net

Yes, it is possible.
carl
A: 

i am an E & TC student. i dont have much of a choice apart from c / c++ . so i need to write the webservice using one of them. what do i do? i have a deadline of a week. what would be the easiest way. are there any sample codes available for webservices written in c / c++ ??

my group have used both gSoap and Apache Axis. i think gSoap is easier. a week is a VERY short time for a web service. get on it.
Raz
A: 

We are using EasySoap (http://easysoap.sourceforge.net/)

wildcat
A: 

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

Pratik
Irony of that one is that just as it got dumped by msft on CPlex, Google started rolling out its own, very similar in structure..
rama-jka toti
A: 

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.

Rafal Rusin