24

I want to host web services in an existing C/C++ application. What is the best solution?

I would like a solution similar to what JAX-WS does for Java. Specifically revolving around SOAP requests.

Any personal experience with available solutions?

mainstringargs
  • 13,563
  • 35
  • 109
  • 174
  • 3
    You probably have already, but I think you should consider not using SOAP and consider a RESTful service instead. In my experience, it leads a far cleaner architecture without needing the cruft of XML. – manku Jul 10 '11 at 11:46
  • @dubdubdubdot How have you created C++ web Service. Is it Multi-threaded or parallel execution. –  Jul 13 '16 at 07:40

6 Answers6

11

As far as I understand the most popular free solution is gSOAP http://gsoap2.sourceforge.net/

MK.
  • 33,605
  • 18
  • 74
  • 111
  • 3
    I've used gSOAP successfully for a couple of projects. The APIs it generates can be a little ugly, but it seems stable and it's been able to handle every web service I've thrown at it. – JonathonW Jul 01 '11 at 02:20
  • @MK how did you create a web service in C++. Can you guide or give me some link about it. –  Jul 13 '16 at 07:39
  • @Mavie Click on the link, it has even a user guide... Please do the effort, it's worth it – Yassin Hajaj Feb 09 '17 at 17:05
8

You should check out Apache Axis from Apache. It has a very nice SOAP implementation & will definitely qualify for one of the best.
It is free and opensource.

Also, have a look at Axis2/C, it is the C version of the Axis2 architecture, which is way more flexible than Axis1.

Alok Save
  • 202,538
  • 53
  • 430
  • 533
5

I tested Pion at http://www.pion.org/. Deriving from its class pion::net::WebService and create HTTP responses is pretty easy.

Evan Teran
  • 87,561
  • 32
  • 179
  • 238
Zhen
  • 4,171
  • 5
  • 38
  • 57
4

I think your best option is to use the WSO2 Web Services Framework for C++ because:

  1. It's high-performance
  2. It's easy to integrate
  3. It's easy to use (Quick start guide)
  4. It have a lot of tools around: WSDL2CPP ( Code Generation tool ), tcpmon ( SOAP Message viewer ) and WSClient ( command line web services client )
  5. It have an organic support for WS-Security, WS-Security Policy, WS-Secure Conversation and WS-Reliable Messaging.
  6. And my favorite: Runtime management using WSO2 Carbon based Web Interface.

See more features here.

There are factual comparison results between WSO's WSF/C++ and others Web services implementations with superior results in favor of WSF (2-3 times better performance).

WSO2 team and community is very active and the technologies provided by them are highly integrated each other and with 3rds via Open Standards. Documentation and examples are vastly.

2

There is no good alround solution out there for c++ web services as far as I can tell. gSoap works well, but it has been maintained by one person, the original coder for its whole life (high risk). WSO's WSF/C++ Was good but got ditched by WSO onto github with no maintainers! It's had no updates for years, and the current 'build' doesn't! If anyone can point me at a high performance c++ restful web service kit, with a reasonable prospect of being maintained. I'd appreciate it.

Beto
  • 63
  • 8
Howard
  • 56
  • 1
2

1.XML-RPC

2.WWSAPI

3.WSO2

The first one looks solid,though I have no hands on Experience.

Jibin
  • 3,054
  • 7
  • 36
  • 51