Hello.

Would somebody tell me how to enrich soap header before sending via webserviceTemplate?
Basicailly, I want to call a WS which authenticates and provides the cookie in the response HTTP header.

I have to call another WS and add this authentication ticket (cookie) for other subsequent WS requests.

I am using following code:

Code:
EncodeBlockWithHeadingsResponseDocument resp = (EncodeBlockWithHeadingsResponseDocument) webServiceTemplate.marshalSendAndReceive(request,
			new SoapActionCallback(soapAction) {
				public void doWithMessage(WebServiceMessage msg){
					System.out.println("encodingManager: doWithMessage");
					SoapMessage smsg = (SoapMessage) msg;
					smsg.setSoapAction(soapAction);
					System.out.println("soapAction: "+smsg.getSoapAction());

				}
			}				
		);
Kindly help.