gsoap

graphic

7.5.1wsdl2h.exe的使用

wsdl2h  是将 wsdl 定义转换成  .h 文件的工具。主要有一些选项:
-c 代表转化成 C  代码。
-s 代表不使用 STL  ,取而代之需要在工程中包含  stdsoap2.h stdsoap2.cpp 
-o file 代表指定输出文件名称。
通常情况下使用命令  wsdl2h –s xxx.wsdl 即可生成想要的 .h 文件
详细参数说明为:
Usage: wsdl2h [-a] [-c] [-d] [-e] [-f] [-g] [-h] [-I path] [-j] [-l] [-m] [-n na
me] [-N name] [-p] [-q name] [-r proxyhost:port] [-s] [-t typemapfile.dat] [-u]
[-v] [-w] [-x] [-y] [-z] [-_] [-o outfile.h] infile.wsdl infile.xsd http://www..

-a      generate indexed struct names for local elements with anonymous types
-c      generate C source code
-d      use DOM to populate xs:any and xsd:anyType elements
-e      don't qualify enum names
-f      generate flat C++ class hierarchy
-g      generate global top-level element declarations
-h      display help info
-I      path  use path to find files
-j      don't generate SOAP_ENV__Header and SOAP_ENV__Detail definitions
-l      include license information in output
-m      use xsd.h module to import primitive types
-n    name  use name as the base namespace prefix instead of 'ns'
-N    name  use name as the base namespace prefix for service namespaces
-o     file  output to file
-p      create polymorphic types with C++ inheritance with base xsd__anyType
-q    name  use name for the C++ namespace for all service declarations
-r      host:port
        connect via proxy host and port
-s      don't generate STL code (no std::string and no std::vector)
-  tfile  use type map file instead of the default file typemap.dat
-u      don't generate unions
-v      verbose output
-w      always wrap response parameters in a response struct (<=1.1.4 behavior)
-x      don't generate _XML any/anyAttribute extensibility elements
-y      generate typedef synonyms for structs and enums
-z      generate pointer-based arrays for backward compatibility < gSOAP 2.7.6e
-_      don't generate _USCORE (replace with UNICODE _x005f)
infile.wsdl infile.xsd http://www... list of input sources (if none: use stdin)

7.5.2soapcpp2.exe的使用

soapcpp2  是生成源码的工具,从某种意义上来说,  WebService ICE  相当的相像。都是网络通信协议的封装方式,所不同的是  WebService 使用的是公开协议。没有特殊选项的情况下  ,gsoap 不需要依赖其他的链接库。  soapcpp2 的主要选项有(注意区分大小写):
-C 代表生成客户端代码。
-S 代表生成服务端代码。
-L 代表不生成 soapClientLib/soapServerLib
-c 代表仅生成 c  代码
-i 代表使用 Proxy
通常情况下使用命令  soapcpp2 –S/-C –L -i xxx.h
详细参数说明为:
Usage: soapcpp2 [-1|-2] [-C|-S] [-L] [-a] [-c] [-d path] [-e] [-h] [-i] [-I path
;path;...] [-l] [-m] [-n] [-p name] [-s] [-t] [-v] [-w] [-x] [infile]

-1      generate SOAP 1.1 bindings
-2      generate SOAP 1.2 bindings
-C      generate client-side code only
-S      generate server-side code only
-L      don't generate soapClientLib/soapServerLib
-a      use value of SOAPAction HTTP header to dispatch method at server side
-c      generate C source code
-dpath  use path to save files
-e      generate SOAP RPC encoding style bindings
-h      display help info
-i      generate service proxies and objects inherited from soap struct
-Ipath  use path(s) for #import
-l      generate linkable modules (experimental)
-m      generate Matlab(tm) code for MEX compiler
-n      use service name to rename service functions and namespace table
-pname  save files with new prefix name instead of 'soap'
-s      generate deserialization code with strict XML validation checks
-t      generate code for fully xsi:type typed SOAP/XML messaging
-v      display version info
-w      don't generate WSDL and schema files
-x      don't generate sample XML message files
infile  header file to parse (or stdin)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值