1、wsdl2h(利用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... ...
wsdl2h常用選項
- -o 文件名,指定輸出頭文件
- -n 名空間前綴 代替默認的ns
- -c 產生純C代碼,否則是C++代碼
- -s 不要使用STL代碼
- -t 文件名,指定type map文件,默認爲typemap.dat
- -e 禁止爲enum成員加上名空間前綴
-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 -Ipath 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 -ofile 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 -rhost: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 infile.wsdl infile.xsd http://www... list of input sources (if none: use stdin)wk_ad_begin({pid : 21});wk_ad_after(21, function(){$('.ad-hidden').hide();}, function(){$('.ad-hidden').show();});
2、soapcpp2(利用1中生成的h文件生成對應的cpp文件)用法 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]
soapcpp2常用選項
- -C 僅生成客戶端代碼
- -S 僅生成服務器端代碼
- -L 不要產生soapClientLib.c和soapServerLib.c文件
- -c 產生純C代碼,否則是C++代碼(與頭文件有關)
- -I 指定import路徑(見上文)
- -x 不要產生XML示例文件
- -i 生成C++包裝,客戶端爲xxxxProxy.h(.cpp),服務器端爲xxxxService.h(.cpp)。
-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)