title: Adding SOAP Header to request
body: <p>I have been trying to add a header to SOAP request as follows </p>
  
  <pre><code>&lt;soapenv:Header&gt;
       &lt;UsernameToken xmlns="http://test.com/webservices"&gt;username&lt;/UsernameToken&gt;
       &lt;PasswordText xmlns="http://test.com/webservices"&gt;password&lt;/PasswordText&gt;
       &lt;SessionType xmlns="http://test.com/webservices"&gt;None&lt;/SessionType&gt;
  &lt;/soapenv:Header&gt;
  </code></pre>
  
  <p>I have found suggestions to use <code>SoapHeader</code> to include header values, but introduces another level such as </p>
  
  <pre><code>&lt;soapenv:Header&gt;
      &lt;CustomHeader&gt;
          &lt;UsernameToken xmlns="http://test.com/webservices"&gt;username&lt;/UsernameToken&gt;
          &lt;PasswordText xmlns="http://test.com/webservices"&gt;password&lt;/PasswordText&gt;
          &lt;SessionType xmlns="http://test.com/webservices"&gt;None&lt;/SessionType&gt;
      &lt;/CustomHeader&gt;
  &lt;/soapenv:Header&gt;
  </code></pre>
  
  <p>Can anyone suggest how I can form a request without <code>CustomHeader</code>.</p>