title: Adding custom SOAP headers from Silverlight client
body: <p>I am trying to set up a web service between a Silverlight client and a Java server. I need to send username tokens (username/password) from the Silverlight client for authentication purposes. Since this is a proof-of-concept, I want to keep things simple and use HTTP as my transport layer. However it looks like Silverlight only supports username tokens over HTTPS (Visual Studio is unable to digest the WSDL from my Java server that does username tokens over HTTP).</p>
  
  <p>So my question is this: how can I add username/password information in the SOAP header sent by my Silverlight client - still using basicHttpBinding and HTTP? It does not have to be WS-Security compliant. Something as simple as this will suffice for my application:</p>
  
  <pre><code>&lt;soapenv:Header&gt;
      &lt;UsernameToken&gt;
          &lt;Username&gt;john&lt;/Username&gt;
          &lt;Password&gt;cool&lt;/Password&gt;
      &lt;/UsernameToken&gt;
  &lt;/soapenv:Header&gt;
  </code></pre>