title: Proper binding configuration for web service with plaintext password
body: <p>I am trying to make a web service client in .NET. I added service reference and Visual Studio created the following binding:</p>
  
  <pre><code>&lt;bindings&gt;
      &lt;basicHttpBinding&gt;
          &lt;binding name="sample" /&gt;
      &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  </code></pre>
  
  <p>but I am getting <code>q0:FailedAuthentication.</code></p>
  
  <p>I found that I am getting results in SoapUI only when I set <code>WSS_TYPE</code> to <code>PasswordText</code>. </p>
  
  <p>How can I set the binding configuration in .NET/WCF to get the same request?</p>
  
  <p>Below is SoapUI request:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:rnl="sample" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soapenv:Header&gt;
      &lt;wsse:Security soapenv:mustUnderstand="1" 
                     xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
                     xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
        &lt;wsse:UsernameToken wsu:Id="UsernameToken-3"&gt;
          &lt;wsse:Username&gt;username&lt;/wsse:Username&gt;
          &lt;wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"&gt;password&lt;/wsse:Password&gt;
          &lt;wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"&gt;XXXX&lt;/wsse:Nonce&gt;
          &lt;wsu:Created&gt;date&lt;/wsu:Created&gt;
        &lt;/wsse:UsernameToken&gt;
      &lt;/wsse:Security&gt;
    &lt;/soapenv:Header&gt;
    &lt;soapenv:Body&gt;
      &lt;rnl:GetLastUpdate/&gt;
    &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>