Search code examples
wcfsoapsoap-clientwcf-binding

What is the difference between BasicHttpBinding and CustomBinding/Soap11?


for the first time we're consuming an SAP NetWeaver web-service on SOAP 1.1 which requires user-name and password authentication over HTTPS.

I'm currently prototyping the WCF application and I successfully can consume the SAP web-service with both of these binding configurations.

  <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>

As long as it provides the required functionality I tend to use a standard binding rather than a custom binding. But I would like to understand it what way it would make a difference to use the one binding or the other.

And any recommendations are helpful especially if you ever consumed an SAP web-service before.

Thanks!


Solution

  • These bindings are equivalent. Custom binding is special type of binding for defining bindings which are not supported in predefined bindings (BasicHttp, WsHttp, NetTcp, ...). You can of course define predefined bindings in custom binding but it is not needed.