views:

290

answers:

8

We're looking at developing a Web Service to function as a basis for a browser display/gui for a networked security prototype written in C++. My experience with web services has been limited to Java. I prefer Web Services in Java because it's on the "beaten path".

One sure was to do this would be to simply code a Java client which invokes the web service, and call it as a command line with parameters from the C++ code.

It's not ideal, since generally speaking an API is preferable, but in this case it would work and be a pretty safe solution.

A resource which does handles web service development in C++ is called gSOAP, at this url: http://gsoap2.sourceforge.net

Any thought on which is a better approach? Has anyone used gSOAP, and if so, what did you think?

+1  A: 

To me is Axis C++.

Pablo Santa Cruz
+1  A: 

I had very good experience with gsoap - very simple, performance is good.

Nikolai N Fetissov
+2  A: 

I'd done things with gSOAP, it's not awful. I'm increasingly opposed to the RPC model for web services, though; it forces you into a lot of connection and session state that adds complexity. A REST interface is simpler and more robust.

Charlie Martin
Can you give a suggestion? thx, jbn
Jack BeNimble
Honestly, the nice thing about REST is that it's simple. Get any HTTP client library, you're done. Here's a bunch of them: http://curl.haxx.se/libcurl/competitors.html
Charlie Martin
Here's some more sources: http://www.thomas-bayer.com/rest-demo.htmhttp://www.xfront.com/REST-Web-Services.html
Charlie Martin
+1  A: 

If it is acceptable to run only on Windows, there is a brand-new API for that purpose: WWSAPI

Nemanja Trifunovic
+1  A: 

For RPC style, have a look at Thrift, I found it quite better ( faster, clearer, a lot of languages implementations) than soap.

fa.
+1  A: 

Instead of calling the java client from the command line, you can create a java virtual machine inside your C app, instantiate the class and call any methods. This is what the java.exe app does and I think the source code is included in the jdk.

Pablote
+1  A: 

Depends on how low level you want to go. You might checkout yield.

ceretullis
+1  A: 

My colleague ended up using a combination of Axis2 / java (for the service) and gsoap for the client. He created the wsdl from the Java service by generating it from a C++ header (using c2wsdl (?) or something like that. He said it was better than using a Java interface because that generated two sets of wsdl, for seperate versions of soap.

Then he used wsdl2java to generate the webservice and a test web client. Once we got that working, he used gsoap to create the web client (in C++), and it worked fine.

thanks for all the answers! I ended using a combination of them.

Jack BeNimble