title: WCF: CustomBinding confuses endpoint
body: <p>I am using CustomBinding to enable Soap 1.1 (endpoint does not support 1.2) + Addressing 1.0. The endpoint is only available over SSL, and runs on some kind of Java/Weblogic platform. </p>
  
  <p>Here is my configuration:</p>
  
  <pre><code>&lt;customBinding&gt;
      &lt;binding name="Soap11Addr10"&gt;
          &lt;textMessageEncoding messageVersion="Soap11WSAddressing10" /&gt;
          &lt;httpsTransport/&gt;
      &lt;/binding&gt;
  &lt;/customBinding&gt;
  </code></pre>
  
  <p>[...]</p>
  
  <pre><code>&lt;endpoint address="https://sekrit:444/more-sekrits/even-more"
      binding="customBinding" bindingConfiguration="Soap11Addr10"
      contract="SomePort" name="SomePortService" /&gt;
  </code></pre>
  
  <p>This configuration seems to confuse the endpoint. When I perform a request against SomePort, WCF first sends a RequestSecurityTokenResponse message, which I think may be unfortunate. Here is a trace of the RSTR envelope:</p>
  
  <pre><code>&lt;s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;s:Header&gt;
      &lt;a:Action s:mustUnderstand="1"&gt;http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue&lt;/a:Action&gt;
      &lt;a:RelatesTo&gt;urn:uuid:7348d908-b767-43e8-9770-09a38461ee87&lt;/a:RelatesTo&gt;
    &lt;/s:Header&gt;
    &lt;s:Body&gt;
      &lt;t:RequestSecurityTokenResponse Context="uuid-7a3c9fde-053d-46e7-aa08-f5725b082691-287" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
        &lt;t:BinaryExchange ValueType="http://schemas.xmlsoap.org/ws/2005/02/trust/spnego" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"&gt;TlRMTVNTUAACAAAAEAAQADgAAAA1wpriPjzjL4iwIJhAmcsBAAAAAGAAYABIAAAABgByFwAAAA9TAEsATwBHAEsAQQBUAFQAAgAQAFMASwBPAEcASwBBAFQAVAABABAAUwBLAE8ARwBLAEEAVABUAAQAEABTAGsAbwBnAGsAYQB0AHQAAwAQAFMAawBvAGcAawBhAHQAdAAHAAgAj73D884kywEAAAAA&lt;/t:BinaryExchange&gt;
      &lt;/t:RequestSecurityTokenResponse&gt;
    &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>The endpoint barfs:</p>
  
  <pre><code>&lt;env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;env:Header&gt;&lt;/env:Header&gt;
    &lt;env:Body&gt;
      &lt;env:Fault xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"&gt;
        &lt;faultcode xmlns=""&gt;ns0:MustUnderstand&lt;/faultcode&gt;
        &lt;faultstring xml:lang="en" xmlns=""&gt;One or more mandatory SOAP header blocks not understood&lt;/faultstring&gt;
      &lt;/env:Fault&gt;
    &lt;/env:Body&gt;
  &lt;/env:Envelope&gt;
  </code></pre>
  
  <p>Is it possible to stop the initial RSTR from being sent?</p>
  
  <p>I can provide more trace and log data upon request.</p>