title: How can I pass a username/password in the header to a SOAP WCF Service
body: <p>I'm trying to consume a third-party web service
  <a href="https://staging.identitymanagement.lexisnexis.com/identity-proofing/services/identityProofingServiceWS/v2?wsdl">https://staging.identitymanagement.lexisnexis.com/identity-proofing/services/identityProofingServiceWS/v2?wsdl</a></p>
  
  <p>I already added it as a service reference but I'm not sure how to pass the credentials for the header.</p>
  
  <p>How can I make the header request match this format?</p>
  
  <pre class="lang-xml prettyprint-override"><code>&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"&gt;
          &lt;wsse:UsernameToken wsu:Id="UsernameToken-49" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
              &lt;wsse:Username&gt;12345/userID&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;password123&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;d+VxCZX1cH/ieMkKEr/ofA==&lt;/wsse:Nonce&gt;
              &lt;wsu:Created&gt;2012-08-04T20:25:04.038Z&lt;/wsu:Created&gt;
          &lt;/wsse:UsernameToken&gt;
      &lt;/wsse:Security&gt;
  &lt;/soapenv:Header&gt;
  </code></pre>