Announcement Announcement Module
Collapse
No announcement yet.
Enrich SOAPHeader (add cookie) before sending via webserviceTemplate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Enrich SOAPHeader (add cookie) before sending via webserviceTemplate

    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.
Working...
X