title: How to pass Authentication Header to JAXWS SOAP client
body: <p>I have generated classes for soap client using wsimport.exe.</p>
  
  <p>My request should look like </p>
  
  <pre><code>POST /posaservice/servicemanager.asmx HTTP/1.1
  Host: ****
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://www.pininteract.com/BalanceInquiry"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Header&gt;
      &lt;AuthenticationHeader xmlns="http://www.pininteract.com"&gt;
        &lt;userId&gt;VALUE&lt;/userId&gt;
        &lt;password&gt;VALUE&lt;/password&gt;
      &lt;/AuthenticationHeader&gt;
    &lt;/soap:Header&gt;
    &lt;soap:Body&gt;
      &lt;BalanceInquiry xmlns="http://www.pininteract.com" /&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>But I don't know how to pass parameters to Authentication Header part.
  Currently my code looks like</p>
  
  <pre><code>val client = new ServiceManager().getServiceManagerSoap()
  var res = client.balanceInquiry()
  println(res)
  </code></pre>
  
  <p>I have class AuthenticationHeader among others generated, but I don't know how to use it.</p>