我正在使用apache axis2开发一个web服务并且已经生成了所需的客户端代码。客户端请求应该像这样:
`<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">
<soapenv:Header>
<RequestSOAPHeader xmlns="http://www.huawei.com.cn/schema/common/v2_1">
<spId>35000001</spId>
<spPassword>de96d901b3bad1db2aab76b7b0b202f2</spPassword>
<serviceId>0003062000001100</serviceId>
<timeStamp>20120731064245</timeStamp>
</RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:startSmsNotification>
<loc:reference>
<endpoint>>http://10.138.30.153:9080/notify</endpoint>
<interfaceName>notifySmsReception</interfaceName>
<correlator>1232</correlator>
</loc:reference>
<loc:smsServiceActivationNumber>23424
</loc:smsServiceActivationNumber> <!--Optional: -->
<loc:criteria>Love</loc:criteria>
</loc:startSmsNotification>
</soapenv:Body>
</soapenv:Envelope>`
我已经成功向请求中添加了正文消息,但无法添加SOAP标头信息。该标头信息是用于验证请求的必要信息。如何在生成的客户端代码中添加SOAP标头信息到SOAP请求中?