C#调用 webservice问题

xf_xufei 2009-12-16 12:08:21
最近做一个C#调用webservice的程序,我在企业内部网添加WEB引用成功,并实现了接口。但现在需要在公网调用,而他们提供的公网的地址无法直接引用,需要加一个soap头。我添加WEB引用的时候报错


<?xml version="1.0" encoding="UTF-8" ?>
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Body>
- <SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client </faultcode>
<faultstring>[ISS.0088.9109] SOAP is only supported using HTTP POST protocol </faultstring>
<faultactor>http://10.60.12.92:6666/soap/proxy_ws </faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

下载“http://test.datacenter.bsteel.net/soap/proxy_ws”时出错。
请求失败,错误信息为:
--
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchem
这是什么意思呢
...全文
110 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
添加SOAP头应该是为了做验证的
你需要知道 对方是怎么样定义的
ermuzi 2009-12-19
  • 打赏
  • 举报
回复
我也想知道,学习中。。。
xf_xufei 2009-12-18
  • 打赏
  • 举报
回复
我自己组织xml发过去返回:soap:ClientInvalid operation: {http://10.30.176.195:7001/sm/ws/WmsWsService}GetResDataByTime
soap头这一层通过了,好像后面调用方法出问题了。等待高手指点。
guyehanxinlei 2009-12-16
  • 打赏
  • 举报
回复
UP
sharp_future 2009-12-16
  • 打赏
  • 举报
回复
貌似是www的权限访问问题,相关资料楼主google一下,这方面我不深入
公司内部可能存在局域网,公网也就是外网了,经过www的
xf_xufei 2009-12-16
  • 打赏
  • 举报
回复
没人知道么

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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