gsoap使用小结

2024-02-18 18:38
文章标签 使用 小结 gsoap

本文主要是介绍gsoap使用小结,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

参考博文:

http://www.cnblogs.com/linxr/archive/2011/10/17/2215285.html


要点一:

wsdl2h(利用wsdl文件生成对应的h文件)用法

**  The gSOAP WSDL parser for C and C++ 1.2.9c
**  Copyright (C) 2000-2007 Robert van Engelen, Genivia Inc.
**  All Rights Reserved. This product is provided "as is", without any warranty.

**  The gSOAP WSDL parser is released under one of the following two licenses:
**  GPL or the commercial license by Genivia Inc. Use option -l for more info.

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... ...


<<<<<<
-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
-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
-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)


要点二:

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]

-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)


要点三:

gsoap生成c/c++代理时候需要指定协议编码,比如:

MyFirstSQLServSoap11BindingProxy Proxy(SOAP_C_UTFSTRING);

这篇关于gsoap使用小结的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/722102

相关文章

C语言中联合体union的使用

本文编辑整理自: http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=179471 一、前言 “联合体”(union)与“结构体”(struct)有一些相似之处。但两者有本质上的不同。在结构体中,各成员有各自的内存空间, 一个结构变量的总长度是各成员长度之和。而在“联合”中,各成员共享一段内存空间, 一个联合变量

Tolua使用笔记(上)

目录   1.准备工作 2.运行例子 01.HelloWorld:在C#中,创建和销毁Lua虚拟机 和 简单调用。 02.ScriptsFromFile:在C#中,对一个lua文件的执行调用 03.CallLuaFunction:在C#中,对lua函数的操作 04.AccessingLuaVariables:在C#中,对lua变量的操作 05.LuaCoroutine:在Lua中,

Vim使用基础篇

本文内容大部分来自 vimtutor,自带的教程的总结。在终端输入vimtutor 即可进入教程。 先总结一下,然后再分别介绍正常模式,插入模式,和可视模式三种模式下的命令。 目录 看完以后的汇总 1.正常模式(Normal模式) 1.移动光标 2.删除 3.【:】输入符 4.撤销 5.替换 6.重复命令【. ; ,】 7.复制粘贴 8.缩进 2.插入模式 INSERT

Lipowerline5.0 雷达电力应用软件下载使用

1.配网数据处理分析 针对配网线路点云数据,优化了分类算法,支持杆塔、导线、交跨线、建筑物、地面点和其他线路的自动分类;一键生成危险点报告和交跨报告;还能生成点云数据采集航线和自主巡检航线。 获取软件安装包联系邮箱:2895356150@qq.com,资源源于网络,本介绍用于学习使用,如有侵权请您联系删除! 2.新增快速版,简洁易上手 支持快速版和专业版切换使用,快速版界面简洁,保留主

如何免费的去使用connectedpapers?

免费使用connectedpapers 1. 打开谷歌浏览器2. 按住ctrl+shift+N,进入无痕模式3. 不需要登录(也就是访客模式)4. 两次用完,关闭无痕模式(继续重复步骤 2 - 4) 1. 打开谷歌浏览器 2. 按住ctrl+shift+N,进入无痕模式 输入网址:https://www.connectedpapers.com/ 3. 不需要登录(也就是

Toolbar+DrawerLayout使用详情结合网络各大神

最近也想搞下toolbar+drawerlayout的使用。结合网络上各大神的杰作,我把大部分的内容效果都完成了遍。现在记录下各个功能效果的实现以及一些细节注意点。 这图弹出两个菜单内容都是仿QQ界面的选项。左边一个是drawerlayout的弹窗。右边是toolbar的popup弹窗。 开始实现步骤详情: 1.创建toolbar布局跟drawerlayout布局 <?xml vers

C#中,decimal类型使用

在Microsoft SQL Server中numeric类型,在C#中使用的时候,需要用decimal类型与其对应,不能使用int等类型。 SQL:numeric C#:decimal

探索Elastic Search:强大的开源搜索引擎,详解及使用

🎬 鸽芷咕:个人主页  🔥 个人专栏: 《C++干货基地》《粉丝福利》 ⛺️生活的理想,就是为了理想的生活! 引入 全文搜索属于最常见的需求,开源的 Elasticsearch (以下简称 Elastic)是目前全文搜索引擎的首选,相信大家多多少少的都听说过它。它可以快速地储存、搜索和分析海量数据。就连维基百科、Stack Overflow、

flask 中使用 装饰器

因为要完成毕业设计,我用到fountain code做数据恢复。 于是在github上下载了fountain code的python原代码。 github上的作者用flask做了fountain code的demo。 flask是面向python的一个网站框架。 里面有用到装饰器。 今天笔试的时候,我也被问到了python的装饰器。

mathematica的使用

因为做实验用到Bloom filter这一技术,Bloom filter里面的数学公式可以用来画图。 那么用什么画图软件比较好呢? 当然是Mathematica啦。 利用代码Plot[{y=x},{x,0,100}] 就可以画出比较好的图 简直nice