
Getting Started
Download the gSOAP package from the SourceForge gSOAP project. You can choose a platform-dependent release or a generic platform-independent release based on autoconfig and automake.
Note: The only difference between these packages is that the gSOAP WSDL parser/importer and gSOAP stub and skeleton compiler are pre-built executables in the platform-dependent release packages. The gSOAP source code and the source code generated by the toolkit is the same, so you can switch between releases without running into code maintenance issues. For the platform-dependent gSOAP releases the mimumum requirements to develop gSOAP Web services and client applications is a C or C++ compiler. For the platform-independent releases you must have Bison and Flex installed (or alternatively Yacc and Lex).
The gSOAP release distribution package provides two compiler tools to develop your applications:
* The 'wsdl2h' WSDL parser.
* The 'soapcpp2' stub and skeleton compiler.
The 'wsdl2h' parser converts WSDL into gSOAP header file specifications of Web services. This specification gives a C/C++ transparent view of the server's functionality. The header file is processed by 'soapcpp2' to generate the source code stubs and skeletons to invoke the service or build a new service based on the WSDL.
The next section explains how these tools are used to build client and server applications.
开始吧
首先从SourceForge gSOPA工程中下载gSOAP开发包。你可以选择一个为特定平台开发的release版本或者一个与平台无关的版本(依靠autoconfig和automake来自动搞定)。
注:这些开发包的唯一差别在于在与平台有关的release开发包中,gSOAP 的WSDL解析器/importer与gSOAP框架编译器(stub and skeleton compiler)是预先编译好的可执行文件。gSOAP的源代码和通过工具包产生出来的源代码是相同的,所以你可以在各个release版本之间自由切换而不需要running into code maintenance issues。对于平台相关的gSOAP版本来说,开发gSOAP的Web服务器和客户端应用程序的最低要求是有一个c或者c++的编译器就ok了。对于平台无关的版本来说,你则必须安装Bison和Flex(或者是Yacc和Lex中的一个)。
gSOAP的分发包提供两个编译工具来开发程序:
* 名为wsdl2h的WSDL解析器
* 名为soapcpp2的框架编译器
'wsdl2h'解析器将WSDL转换为Web service规格的gSOAP头文件。这个规范用c/c++的方式描述了服务器的功能。soapcpp2会用这个头文件来产生调用服务的框架源代码或者建构基于WSDL的新的服务。
下一节我们将介绍这些工具是如何被用来建构客户端和服务器端的程序的。

