【问题标题】:Who is responsible to set the To WS(Ws-Addressing) namespace in SOAP header in an outgoing message?谁负责在传出消息的 SOAP 标头中设置 To WS(Ws-Addressing) 命名空间?
【发布时间】:2011-12-05 04:02:21
【问题描述】:

我创建了一个 .Net 客户端来访问 Web 服务。在客户端构造中生成的 SOAP 请求 xml 使用 WS-Addressing 命名空间为“xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing.”,但在服务端它需要 WS-Addressing命名空间为“xmlns:wsa=http://www.w3.org/2005/08/addressing”。我们如何在请求中配置正确的 WS-Addressing 命名空间。帮我解决这个问题?

【问题讨论】:

  • 你是如何创建客户端的? “添加服务参考”?

标签: c# web-services


【解决方案1】:

根据MSDN,WS 寻址有两个版本:2004 年 8 月 10 日版本和“官方”版本。我认为你必须创建一个自定义绑定来指定soap寻址版本:

<bindings>
    <customBinding name="CorrectSoapBinding">
        <textMessageEncoding messageVersion="Soap12WSAddressing10"/>
  </customBinding>
</bindings>

【讨论】:

    猜你喜欢
    • 2021-12-29
    • 1970-01-01
    • 2011-04-26
    • 1970-01-01
    • 1970-01-01
    • 2013-12-22
    • 2012-02-26
    • 2013-03-15
    • 1970-01-01
    相关资源
    最近更新 更多