title: Ksoap2 android - pass simple soap header
body: <p>I'm using ksoap2 to call a WCF service, and as I understand, this library lets you create the request with headers in different ways, but I can't find a way to create a request with the simplest header. What I want to achieve is to have this structure in the xml that will be sent:</p>
  
  <pre><code>&lt;soap:Header&gt;
  
      &lt;authToken&gt;tokenhere&lt;/authToken&gt;
  
  &lt;/soap:Header&gt;
  </code></pre>
  
  <p>The closest I can get to it is</p>
  
  <pre><code>Element[] header = new Element[1];
  header[0] = new Element().createElement(null, "authToken");
  
  
  header[0].setAttribute(null, "authToken" ,authToken);
  envelope.headerOut = header;
  </code></pre>
  
  <p>Which produces this:</p>
  
  <pre><code>&lt;v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:d="http://www.w3.org/2001/XMLSchema" 
  xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
  xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;v:Header&gt;&lt;authToken authToken="PD94bWwgdmVyc" /&gt;&lt;/v:Header&gt;
  &lt;v:Body&gt;&lt;/v:Body&gt;
  &lt;/v:Envelope&gt;
  </code></pre>