This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
An easy way to send out a SOAP message with header is:
Note: Modify the header and body per your requirement. Above source is from samples/message/TestMsg.java in axis samples).
At the service end you will need message handlers (refer axis samples/echo/echoHeaderStringHandler.java) which can process both soap request and response to produce the required header in the response soap message.
At the client you can read the response header as follows:
MessageContext mc = call.getMessageContext(); Vector headerVec = mc.getResponseMessage().getSOAPEnvelope().getHeaders(); You can explore further on these lines.