gSOAP is an opensource implementation of SOAP which provides:
-
automated SOAP and XML data binding for data structures in C (using -c option) or C++ (the default)
-
automated program code generation and data mapping of both native and user defined data types. Using gSOAP you can translate to and from XML without needing to write either conversion code or XML verification code.
-
an optional webserver - or you can deliver the service as a CGI program - see the gSOAP document in the gsoap/doc subdirectory
gSOAP is a prerequisite for Aubit4GL’s web service programming.
Get gSOAP from
Select gSOAP toolkit standard from the list of software packages.
For our purposes the important tools provided by gSOAP, in the gsoap/bin subdirectory, are:
-
wsdl2h -c a WSDL/schema importer and data binding mapper tool. For example the command
wsdl2h -c -o calc.h http://www.genivia.com/calc.wdsl
will output a file: calc.h which translates the WSDL into C language #define statements
-
soapcpp2 -c a stub/skeleton code generator. For example the command
soapcpp2 -c calc.h
will create for you the following files:
-
calcStub.h an annotated copy of the input definitions
-
calcH.h declares XML serialiser functions
-
calcC.c defines XML serialiser functions
-
calcClient.c Client calling stubs
-
calcLibClient.c SOAP Client library functions
-
calcServer.c Server calling stubs
-
calcLibServe.c Server library functions
-
a bunch of other .xml and .nsmap files
gSOAP licenses wsdl2h and the code generated by it for GPL opensource products, educational use, and non-commercial use. If you wish to exploit it commercially, consult the licence which comes with the gSOAP download.