title: how to set soap Header using ksoap2 - android
body: <p>I need to set the soap header information as part of authentication of a web method. I'm using <strong><em>ksoap2</em></strong> API to call .NET web service. Here is the soap header with request.</p>
  
  <pre><code>&lt;soap:Header&gt;
      &lt;DTHeader xmlns="http://myServer.com/webservices/"&gt;
        &lt;Username&gt; string &lt;/Username&gt;
        &lt;Password&gt; string &lt;/Password&gt;
      &lt;/DTHeader&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
      &lt;MyTestMethod xmlns="http://myServer.com/webservices/"&gt;
         &lt;ID&gt; string &lt;/ID&gt;
         &lt;TransID&gt; guid &lt;/TransID&gt;
       &lt;/MyTestMethod&gt;
  &lt;/soap:Body&gt;
  </code></pre>
  
  <p>Can you please provide the android code to set the soap header "DTHeader" and set "Username" and "Password".</p>