title: How to add soap header information to a java soap service request using apache axis2
body: <p>I am working on a web service using apache axis2 and i have generate the required client code. The client request should look like this:</p>
  
  <pre><code>`&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:v2="http://www.huawei.com.cn/schema/common/v2_1"
  xmlns:loc="http://www.csapi.org/schema/parlayx/sms/notification_manager/v2_3/local"&gt;
  &lt;soapenv:Header&gt;
      &lt;RequestSOAPHeader xmlns="http://www.huawei.com.cn/schema/common/v2_1"&gt;
          &lt;spId&gt;35000001&lt;/spId&gt;
          &lt;spPassword&gt;de96d901b3bad1db2aab76b7b0b202f2&lt;/spPassword&gt;
          &lt;serviceId&gt;0003062000001100&lt;/serviceId&gt;
          &lt;timeStamp&gt;20120731064245&lt;/timeStamp&gt;
      &lt;/RequestSOAPHeader&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
      &lt;loc:startSmsNotification&gt;
          &lt;loc:reference&gt;
              &lt;endpoint&gt;&gt;http://10.138.30.153:9080/notify&lt;/endpoint&gt;
              &lt;interfaceName&gt;notifySmsReception&lt;/interfaceName&gt;
              &lt;correlator&gt;1232&lt;/correlator&gt;
          &lt;/loc:reference&gt;
          &lt;loc:smsServiceActivationNumber&gt;23424
          &lt;/loc:smsServiceActivationNumber&gt; &lt;!--Optional: --&gt;
          &lt;loc:criteria&gt;Love&lt;/loc:criteria&gt;
      &lt;/loc:startSmsNotification&gt;
  &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;`
  </code></pre>
  
  <p>I have been able to add body message to my request but not soap header information. The header information is required for validation of the request. How can i add soap header information to my soap request in the generated client code?</p>