Qt 开发WEB Services客户端代码(使用gSoap)
1. 首先下载gSoap开发包 http://sourceforge.net/projects/gsoap2 目录包含 wsdl2h.exe( 由wsdl生成接口头文件C/C++格式的头文件 )和soapcpp2.exe(用来根据接口头文件生成应用程序客户端和服务端的框架文件)
2. wsdl2h.exe -o interface.h http://127.0.0.1:8080/axis2/services/HelloWorld?wsdl
3. soapcpp2.exe -C interface.h 则生成客户端相关文件
4. 加入#include "soapH.h"、 #include "calc.nsmap" 两个文件
5.
const char server[] = "http://websrv.cs.fsu.edu/~engelen/calcserver.cgi";
int main(int argc, char **argv)
{
string qsStr;// 调用生成参数的函数
struct soap clientObj;
soap_init(&clientObj);
_ns1__sendSourceFrameByRtuAddress sendSourceFrameByRtuAddress;
sendSourceFrameByRtuAddress.strCommand = &qsStr;
_ns1__sendSourceFrameByRtuAddressResponse sendSourceFrameByRtuAddressResponse;
soap_call___ns1__sendSourceFrameByRtuAddress(&clientObj,m_qsHttpHost.toStdString().c_str(),"",&sendSourceFrameByRtuAddress,sendSourceFrameByRtuAddressResponse);
if (clientObj.error)
{
soap_destroy(&clientObj);
soap_end(&clientObj);
soap_done(&clientObj);
continue;
}
return 0;
}
http://www.qtcn.org/bbs/apps.php?q=diary&a=detail&did=2338&uid=144527
Qt 开发WEB Services客户端代码(使用gSoap)的更多相关文章
- QtSoap开发web services客户端程序
首先需要下载QtSoap开源包,下载地址为: http://www.filestube.com/q/qtsoap+download, 我使用的是:qtsoap-2.6-opensource(不 ...
- 在 IBM RAD 平台上基于 JAX-WS 开发 Web Services服务器端,客户端
原文地址:https://www.ibm.com/developerworks/cn/websphere/library/techarticles/1305_jiangpl_rad/1305_jian ...
- 用Qt开发Web和本地混合的应用
QtWebkit 模块使得Qt widget能够通过HTML的object标签嵌入到web页面中,并通过JavaScript代码进行访问,而Qt对象也能相应的访问web页面元素. 将Qt对象插入到we ...
- 利用WSCF进行契约先行的Web Services开发
http://www.cnblogs.com/goody9807/archive/2007/06/05/772107.html 什么是契约先行(Contract-First)? 如果说一个新的软件开发 ...
- 跟我一起学WCF(3)——利用Web Services开发分布式应用
一.引言 在前面文章中分别介绍了MSMQ和.NET Remoting技术,今天继续分享.NET 平台下另一种分布式技术——Web Services 二.Web Services 详细介绍 2.1 We ...
- 利用Web Services开发分布式应用
一.引言 在前面文章中分别介绍了MSMQ和.NET Remoting技术,今天继续分享.NET 平台下另一种分布式技术——Web Services 二.Web Services 详细介绍 2.1 We ...
- 使用 python 开发 Web Service
使用 python 开发 Web Service Python 是一种强大的面向对象脚本语言,用 python 开发应用程序往往十分快捷,非常适用于开发时间要求苛刻的原型产品.使用 python 开发 ...
- Web services 安全 - HTTP Basic Authentication
根据 RFC2617 的规定,HTTP 有两种标准的认证方式,即,BASIC 和 DIGEST.HTTP Basic Authentication 是指客户端必须使用用户名和密码在一个指定的域 (Re ...
- Delphi 6 Web Services初步评估之三(转)
Delphi 6 Web Services初步评估之三(转) Delphi 6 Web Services初步评估之三(转)★ 测试总体印象:在整个测试中,对Delphi 6创建的Web Servi ...
随机推荐
- Python 工具类与工具函数 —— pair
def pair(lis): n = len(lis) for i in range(n): for j in range(i+1, n): yield lis[i], lis[j] 这样在调用端,访 ...
- Read-Copy Update Implementation For Non-Cache-Coherent Systems
A technique for implementing read-copy update in a shared-memory computing system having two or more ...
- Dojo第一节:学会使用firebug对js,Dojo进行调适
内容概要: 学会使用firebug的基本功能 1. 简介:Firebug是Firefox的一个插件,用来对js代码进行调适的工具. (官方废话:Firebug是firefox下的一个插件,可以调试全部 ...
- VC++实现Vista和Win7系统低权限程序向高权限程序发消息
Windows 7已经隆重发布,但是很多程序员已经通过RTM等版本尝到了Windows 7的甜处.那么在Windows 7下用户界面特权隔离,将是本文我们介绍的重点. 我们介绍了操作系统服务的Sess ...
- Android设备与外接U盘实现数据读取操作
现在越来越多手机支持OTG功能,通过OTG可以实现与外接入的U盘等USB设备实现数据传输.关于OTG,可以参考: http://blog.csdn.net/srw11/article/details/ ...
- Logical partitioning and virtualization in a heterogeneous architecture
A method, apparatus, and computer usable program code for logical partitioning and virtualization in ...
- UVA 548(二进制重建和遍历)
J - Tree Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Ap ...
- 手把手教你安装QT集成开发环境(操作系统为ubuntu10.04,需要先安装build-essential和libncurses5-dev)
在安装QT集成开发工具包之前需要先安装build-essential和libncurses5-dev这两个开发工具和库,libncurses5-dev库是一个在Linux/Unix下广泛应用的图形函数 ...
- 图像处理与计算机视觉的 topics
光学图像(optical image): the apparent reproduction of an object, formed by a lens or mirror system from ...
- wpf 自定义窗口,最大化时覆盖任务栏解决方案
原文:wpf 自定义窗口,最大化时覆盖任务栏解决方案 相信很多人使用wpf时会选择自定义美观的窗口,因此会设置WindowStyle="None" 取消自带的标题栏.但这样使用 W ...