加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

使用 gsoap 产生 webservice 代理类

发布时间:2020-12-17 01:22:31 所属栏目:安全 来源:网络整理
导读:英文原址 http://www.blinnov.com/2008/01/22/wcf-service-unmanaged-client/en/ 原文主要是针对WCF,但我尝试了两次没有成功,但方法对于WEBSERVICE 是成功的 wsdl2h.exe -o myService.h http://localhost:8080/MyService/metadata/?wsdl 这一行很重要,即

英文原址 http://www.blinnov.com/2008/01/22/wcf-service-unmanaged-client/en/

原文主要是针对WCF,但我尝试了两次没有成功,但方法对于WEBSERVICE 是成功的

wsdl2h.exe -o myService.h http://localhost:8080/MyService/metadata/?wsdl

这一行很重要,即使对于webservice 也要加最后的 /wsdl,不然无法正常产生头文件

It will create a file myService.h contains some basic bindings enough to write SOAP client in C. As I wanted to use C++,I had to move a little bit further and take a next step:

soapcpp2 -i -I ../gsoap/import -x -C myService.h

Option -i tells compiler to derive SOAP proxies from soap struct. This is not necessary,but I noticed the code looks less messy this way.Option -I specifies path to import directory in gSOAP distribution.Option -C enables client-side code generation onlyand -x is needed if you don’t need to have any sample XML message files.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读