cmd: wsdl2h -h [ show the help ]
** The gSOAP WSDL/Schema processor for C and C++, wsdl2h release 2.8.8
** Copyright (C) 2000-2012 Robert van Engelen, Genivia Inc.
** All Rights Reserved. This product is provided "as is", without any warranty.
** The wsdl2h tool is released under one of the following two licenses:
** GPL or the commercial license by Genivia Inc. Use option -l for details.
Usage: wsdl2h [-a] [-c] [-d] [-e] [-f] [-g] [-h] [-I path] [-i] [-j] [-k] [-l] [-m] [-n name] [-N name] [-p|-P] [-q name] [-r proxyhost[:port[:uid:pwd]]] [-s] [
-t typemapfile] [-u] [-v] [-w] [-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, xs:anyType, and xs:anyAttribute
-e don't qualify enum names
-f generate flat C++ class hierarchy
-g generate global top-level element declarations
-h display help info
-i don't import (advanced option)
-Ipath use path to find files
-j don't generate SOAP_ENV__Header and SOAP_ENV__Detail definitions
-k don't generate SOAP_ENV__Header mustUnderstand qualifiers
-l display license information
-m use xsd.h module to import primitive types
-nname use name as the base namespace prefix instead of 'ns'
-Nname use name as the base namespace prefix for service namespaces
-ofile output to file
-p create polymorphic types with C++ inheritance from base xsd__anyType
-P don't create polymorphic types with C++ inheritance from xsd__anyType
-qname use name for the C++ namespace of all declarations
-rhost[:port[:uid:pwd]]
connect via proxy host, port, and proxy credentials
-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)
-W suppress warnings
-x don't generate _XML any/anyAttribute extensibility elements
-y generate typedef synonyms for structs and enums
-z1 compatibility with 2.7.6e: generate pointer-based arrays
-z2 compatibility with 2.7.15: qualify element/attribute referenced members
-_ don't generate _USCORE (replace with UNICODE _x005f)
infile.wsdl infile.xsd http://www... list of input sources (if none: use stdin)
cmd: soapcpp2 -h [ show the help ]
Usage: soapcpp2 [-1|-2] [-C|-S] [-T] [-L] [-a] [-b] [-c] [-d path] [-e] [-f N] [-h] [-i] [-I path;path;...] [-k] [-l] [-m] [-n] [-p name] [-s] [-t] [-u] [-v] [-
w] [-x] [-y] [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
-T generate server auto-test code
-L don't generate soapClientLib/soapServerLib
-a use SOAPAction HTTP/WSA header to invoke server-side operations
-b serialize byte arrays char[N] as string
-c generate C source code
-dpath use path to save files
-e generate SOAP RPC encoding style bindings
-fN file split of N XML serializer implementations per file (N>=10)
-h display help info
-Ipath use path(s) for #import
-i generate C++ service proxies and objects inherited from soap struct
-j generate C++ service proxies and objects that share a soap struct
-k generate data structure walkers (experimental)
-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'
-qname use name as the C++ namespace of all declarations
-s generate deserialization code with strict XML validation checks
-t generate code for fully xsi:type typed SOAP/XML messaging
-u uncomment comments in WSDL/schema output by suppressing XML comments
-v display version info
-w don't generate WSDL and schema files
-x don't generate sample XML message files
-y include C/C++ type access information in sample XML messages
infile header file to parse (or stdin)
1.gSoap开发包的下载地址http://sourceforge.net/projects/gsoap2
2.wsdl下载地址:http://www.onvif.org/Documents/Specifications.aspx [下载成xml文件基本可以, 好像没差别,对比了一下]
3.[需要拷贝到compile目录中 ] 修改typemap.dat,h在FAQ页面下的How do I use gSOAP for the ONVIF specifications? [ http://www.cs.fsu.edu/~engelen/soap.html ]
typemap.dat位于gsoap_2.8.8\gsoap-2.8\gsoap
4. 链接网络生成方法的优点是不用考虑以上文件对其它文件的依赖关系,不用修改引入路径。
该方法的缺点跟网速有关,因此中途可能会中断,如果超过5分钟未生成,可重新执行命令, 通过代理上网则无法生成,不推荐用此方法。
各url之间用空格隔开.
wsdl2h -s -t ./typemap.dat -o onvif.h http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl http://www.onvif.org/onvif/ver20/analytics/wsdl/analytics.wsdl http://www.onvif.org/onvif/ver10/analyticsdevice.wsdl http://www.onvif.org/onvif/ver10/media/wsdl/media.wsdl http://www.onvif.org/onvif/ver10/deviceio.wsdl http://www.onvif.org/onvif/ver10/display.wsdl http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl http://www.onvif.org/onvif/ver20/imaging/wsdl/imaging.wsdl http://www.onvif.org/onvif/ver10/recording.wsdl http://www.onvif.org/onvif/ver10/replay.wsdl http://www.onvif.org/onvif/ver10/search.wsdl http://www.onvif.org/onvif/ver10/receiver.wsdl http://www.onvif.org/onvif/ver20/ptz/wsdl/ptz.wsdl
5.本地compile [ 需要修改部分文件路径 ]
wsdl2h.exe -o onvif.h -s -t ./typemap.dat remotediscovery.xml devicemgmt.xml event.xml media.xml analytics.xml deviceio.xml imaging.xml ptz.xml
6.create the onvif source code
soapcpp2.exe -2 onvif.h -C -x -L -i -d ./src -I ./import;./custom
[ soapcpp2.exe位于gsoap_2.8.8\gsoap-2.8\gsoap\bin ]
[ import位于gsoap_2.8.8\gsoap-2.8\gsoap ]
[ custom位于gsoap_2.8.8\gsoap-2.8\gsoap ] 需要拷贝到当前目录中
2.8.17 compile will be [ "1 semantic error" ]:wsa5.h(288): **ERROR**: remote method name clash: struct/class 'SOAP_ENV__Fault' already declared at line 274
wsa5.h 文件中注释掉即可, 有无影响待确认
7.
source files:
http://blog.csdn.net/zsl461975543/article/details/8971143
http://m.blog.csdn.net/blog/woaiguzi/9133215
http://wenku.baidu.com/link?url=PrUXhGuHWGqAAqYmNEqMmwb0BGYOKckSduKXJm8pnSJpCDG4AJxqWYxV6nnncv5GAGYQ8sePTsWDYIeA49H7HsyeTZvZJOKLwePAfjDN8le
http://blog.chinaunix.net/uid-20682890-id-4057549.html
http://blog.csdn.net/stelalala/article/details/9182443
http://blog.csdn.net/darkone/article/details/1442525
http://www.fqyy.org/sunu/archives/1015.html
http://blog.csdn.net/stelalala/article/details/9182443
http://www.cs.fsu.edu/~engelen/soap.html
http://blog.csdn.net/ghostyu/article/details/8182516
http://blog.csdn.net/zhuzhihai1988/article/details/8131370
http://www.360doc.com/content/14/0808/10/9075092_400282762.shtml
http://blog.csdn.net/butyesbutno/article/details/8608059
gsoap_2.8.8与2.8.17 编译生成onvif框架
最新推荐文章于 2021-05-03 15:21:08 发布