我正在使用Apache Axis生成Web服务客户端。我需要在请求中添加多个标头元素。请在下面找到Soap UI请求主体。
<soap:Header>
<token xmlns="test">12345</token>
<idnum xmlns="test">true</idnum>
<login xmlns="test">5678</login>
<issuer xmlns="test">welcome</issuer>
</soap:Header>
您能指导我一种方法吗?在此先感谢。
您可以从SOAPEnvelope获取SOAPHeader(也可以从MessageContext获取SOAPEnvelope。)>
然后,您可以将SOAPHeaderBlock,OMAttribute或子元素添加到SOAPHeader。我不确定您需要哪个。