标头中的SOAP会话密钥

时间:2013-12-05 09:42:23

标签: java soap header

我尝试使用saaj发送SOAP消息,但我无法添加多个headers元素,如何发送如下的SOAP消息?

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"xmlns:ns1="urn://xparcws/ticket" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn://xparcws/session" xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
<env:Header>
<ns2:Session><scalar>asd</scalar>
<sessionkey>67e61b5b36e3c989d91eba0d8621</sessionkey>
</ns2:Session>
</env:Header>
<env:Body>
<ns1:TicketService.requestTicket env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<ticketid xsi:type="xsd:long">1261534</ticketid>
</ns1:TicketService.requestTicket></env:Body>
</env:Envelope>

0 个答案:

没有答案