gSOAP toolkit SOAP per C/C++

Reading time: 4 – 6 minutes

gSOAP, després de perdre-li la pista durant molt de temps aquesta llibreria de C i C++ crec que és la millor de codi obert i GPL que he trobat. Així doncs, ús la vull recomenar. El nom ve de “SOAP generator” i el va fer un professor, la versió 1.0 va sortir l’any 1999, per tant, podriem dir que l’eina esta més que provada si tenim en compte que va per la versió 2.7.1 que va sortir al gener del 2008.

Per entendre una mica que ofereix aquest toolkit esta molt bé fixar-se en aquest parell de gràfics que donen una visió de l’eina quan l’usem com a servidor SOAP:

gSOAP schema for server mode

i com a client SOAP:

gSOAP schema for client mode

Si haguessim de fer una llista de funcionalitats més detallada i tècnica em quedaria amb la que ofereix la pàgina de l’aplicació:

  • All-in-one package. Independence from third-party tools and libraries ensures successful builds and reliable runtime execution.
  • Open source with several license options.
  • gSOAP supports both pure ANSI C application development and mixed C/C++ application development.
  • gSOAP is the only toolkit that supports XML-to-C/C++ mapping for native C and C++ data types, which means that you can serialize your application data directly instead of having to use wrappers or SOAP/XML-specific data types. Any C or C++ data type can be serialized when it can be specified in a C/C++ header file (except unions). The toolkit automatically serializes pointer-based data structure graphs, including cyclic graphs and pointers to derived class instances to support polymorphism.
  • The toolkit follows the WS-I Basic Profile 1.0a compliance recommendations. It warns about potential interoperability issues before building a new Web service application, so you don’t have to go through another development cycle to make your services compliant. In addition, a report is available to check compliance.
  • Complete support for industry-standard Web services protocols SOAP 1.1/1.2 (RPC and doc/lit), WSDL 1.1, and UDDI v2. Supports XML schema with primitive XSD types, simpleTypes, complexTypes, extension, restriction, elements, attributes, groups, attributeGroups, and arrays (including polymorphic data types and SOAP 1.1 encoding of multi-dimensional sparse arrays). Extensive interoperability testing with other SOAP toolkits resulted in a toolkit release that has proven to be stable, robust, and reliable.
  • Supports SOAP-over-UDP, MIME (SwA), DIME (streaming), MTOM (streaming), HTTP1.0/1.1, IPv4, IPv6, RSS, XML-RPC, WS-Addressing, WS-Enumeration, and many other WS-* protocols.
  • Supports WS-Security: authentication, tokens, digital signatures (XML encryption will be added in the near future).
  • gSOAP is the only toolkit that implements streaming techniques for DIME and MTOM binary attachment transfers. It also supports SOAP with Attachements (SwA) Multipart/related MIME attachments.
  • Fast and efficient because gSOAP uses streaming XML parsing techniques. Typical round-trip SOAP service invocation latencies are below 1ms. Shown to be the fastest SOAP1.1/1.2 compliant C/C++ implementation available (wrt. most common uses we tested).
  • Very portable: Windows, Linux, Unix, Mac OS X, Solaris, HP-UX, AIX, FreeBSD, TRU64, Irix, QNX, VxWorks, MS-DOS. Also portable to handheld devices such as WinCE (Pocket PC), Palm OS, Symbian, and embedded Linux. Clients and server applications can be created that are under 100K with a total memory footprint under 150K.
  • The gSOAP WSDL parser automates server and client application development. gSOAP also generates WSDL documens to publish your services.
  • gSOAP Web Services and clients are just as easy to program as C# and JavaRMI, see How To section below.
  • Serialization of native C and C++ data types allows you also to store and retrieve application data from XML repositories.
  • Includes stand-alone HTTP/1.1 and HTTPS secure Web Server.
  • Offers Apache_mod, IIS, WinInet, CGI, and FastCGI interfaces.
  • Supports HTTP/1.1 POST/GET SOAP/XML messaging with compression, chunking, keep-alive, logging, and SSL encryption.
  • The gSOAP compiler can be conveniently integrated in an IDE. For example, MSVC++ 6.0 project examples with gSOAP integrated in MSVC++ are included in the gSOAP distribution for Windows.
  • Security: supports HTTPS and WS-Security. In addition, the source codes have been carefully written to avoid security holes such as buffer overruns. Also, gSOAP is open source which means that the gSOAP implementation can be verified.
  • gSOAP’s memory management uses garbage collection so (deserialized) data can be cleaned up without a hassle.
  • Company backup for support, licensing, and consulting.
  • Extensive documentation.