【问题标题】:What is the difference between BasicHttpBinding and CustomBinding/Soap11?BasicHttpBinding 和 CustomBinding/Soap11 有什么区别?
【发布时间】:2011-07-04 07:49:55
【问题描述】:

我们第一次在 SOAP 1.1 上使用 SAP NetWeaver Web 服务,该服务需要通过 HTTPS 进行用户名和密码身份验证。

我目前正在对 WCF 应用程序进行原型设计,并且我可以通过这两种绑定配置成功使用 SAP Web 服务。

  <basicHttpBinding>
    <binding name="SapEndpoint">
        <security mode="Transport">
            <transport clientCredentialType="Basic" />
        </security>
    </binding>
  </basicHttpBinding>

  <customBinding>
    <binding name="SapSoap11Endpoint">
        <textMessageEncoding messageVersion="Soap11" />
        <httpsTransport authenticationScheme="Basic" />
    </binding>
  </customBinding>

只要它提供所需的功能,我倾向于使用标准绑定而不是自定义绑定。但我想了解使用一种或另一种绑定会有什么不同。

如果您以前使用过 SAP 网络服务,任何建议都会很有帮助。

谢谢!

【问题讨论】:

    标签: wcf soap soap-client wcf-binding


    【解决方案1】:

    这些绑定是等效的。自定义绑定是一种特殊类型的绑定,用于定义预定义绑定(BasicHttp、WsHttp、NetTcp、...)中不支持的绑定。您当然可以在自定义绑定中定义预定义的绑定,但这不是必需的。

    【讨论】:

      【解决方案2】:

      我认为没有任何区别。

      两个绑定都包含相同的绑定元素,顺序相同,配置相同。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-10-06
        • 1970-01-01
        • 1970-01-01
        • 2023-03-03
        • 1970-01-01
        • 2010-10-02
        • 2011-12-12
        • 2010-09-16
        相关资源
        最近更新 更多