I am new to Web Service development. I am developing a web service using Spring WS. I need to add soap header in request so below is my code to add header in request at client side.
getWebServiceTemplate()
.sendSourceAndReceiveToResult(source,
new WebServiceMessageCallback(){
public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException{
SaajSoapMessage soapMessage = (SaajSoapMessage) message;
SoapHeaderElement messageId = soapMessage.getSoapHeader().addHeaderElement(new QName("http://www.w3.org/2005/08/addressing", "messageId", "wsa"));
messageId.setText("Test Security Token");
}
},result);
How do I get this header out of the request in my server side class?
I have used the Eclipse Axis plugin to generate my wsdl to class skeleton. I am using Spring 2.