soap 协议 VC++如何在post消息中添加user-agent消息?

luoj166 2013-04-19 06:37:15
使用soap toolkit 3.0 向服务端发送一个soap包 如下:
POST /WebServices/WeatherWS.asmx?wsdl HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Type: text/xml; charset="UTF-8"
User-Agent: SOAP Toolkit 3.0
SOAPAction: "http://WebXml.com.cn/getWeather"
Content-Length: 532
Host: webservice.webxml.com.cn

<?xml version="1.0" encoding="UTF-8" standalone="no"?><Soap:Envelope Soap:encodingStyle="" xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema" xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/
现在需要将User-Agent:后的信息换掉,因为服务端会有一个验证。。我找了一下soap文档,没有发现可设置属性的地方。。
...全文
155 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
luoj166 2013-04-20
  • 打赏
  • 举报
回复
Getting message body from ISoapSerializerPtr 这个有没有方法呢
luoj166 2013-04-20
  • 打赏
  • 举报
回复
我用curl类来处理了 蛮麻烦 另外追问一下 有生成soap xml文件的类库没,像soap toolkit 3.0 里面的直接用函数添加
oyljerry 2013-04-19
  • 打赏
  • 举报
回复
这个可能是SOAP API自己添加的,你要改的话,估计要从网络层等来修改了

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧