The gSOAP tools minimize application adaptation efforts for building Web Services by using an XML C/C++ data binding implemented by source-to-source code generation tools. The gSOAP wsdl2h tool imports one or more WSDLs and XML schemas and generates a gSOAP header file in familiar C/C++ Syntax with the Web service operations and the C/C++ data types used by the services. The gSOAP soapcpp2 compiler then takes this header file and generates XML serializers for the data types (soapH.h and soapC.cpp),the client-side stubs (soapClient.cpp),and server-side skeletons (soapServer.cpp). The gSOAP soapcpp2 compiler can also generate WSDL deFinitions for implementing a service from scratch,i.e. without defining a WSDL first. This "closes the circle" in that it enables Web services development from WSDL or directly from a set op C/C++ operations in a header file without the need for users to analyze Web service details. You only need to follow a few steps to execute the tools from the command line or Makefile (see also MSVC++ project examples in the samples directory with tool integration in the MSVC++ IDE). For example,to generate code for the calculator Web service,we run the wsdl2h tool from the command line on the URL of the WSDL and use option -o to specify the output file: 首先你已经拿到wsdl协议规范文件。 譬如编写客户端应用: $ wsdl2h -o calc.h http://www.cs.fsu.edu/~engelen/calc.wsdl $soapcpp2 -C -L -I../../import calc.h 即生成了代码: 编写服务端 ccid-m:/cs/test/tmp/gsoap-2.7/gsoap/bin/linux386/path>soapcpp2 -S -a -d./path/ -L -I../../import -x PortOfMark.h
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。