title: Adding authentication to security header in WCF to consume Metro WSIT service
body: <p>I use <a href="http://www.mkyong.com/webservices/jax-ws/application-authentication-with-jax-ws/" rel="nofollow">this</a> simple way to attach username and password to the SOAP request header. This works fine inside Java boundaries, but I want to be able to call it with my WCF client. How do I do this?</p>
  
  <p>I've tried the following code, but it does not include the credentials in the header:</p>
  
  <pre><code>wsClient.ClientCredentials.UserName.UserName = "Hello";
  wsClient.ClientCredentials.UserName.Password = "World";
  </code></pre>
  
  <p>Thanks in advance!</p>