Announcement Announcement Module
No announcement yet.
SimpleWebServiceOutboundGateway & Response SOAP Headers Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SimpleWebServiceOutboundGateway & Response SOAP Headers


    How can i access the response soap headers when using SimpleWebServiceOutboundGateway? The soap body is set to the Message payload, but the soap:Header(s) are not getting set. I saw a JIRA defect which fixes the InboundGateway ( but not able to found anything related to outbound gateway.

    Is there a way to get hold of the response headers ?
    Any help is greatly appreciated, since i got stuck into this issue.


  • #2
    Ultimately the request is processed by ate :

    protected Object doSendAndReceive(MessageContext messageContext,
    WebServiceConnection connection,
    WebServiceMessageCallback requestCallback,
    WebServiceMessageExtractor responseExtractor)
    You can extend SimpleWebServiceOutboundGateway, inject appropriate "interceptors", set them in the underlying webservice template, something like,
    getWebServiceTemplate().setInterceptors(intercepto rs)
    and can modify / update soap header just before its wired...

    Might not be the best way, but it will keep you running,.
    Last edited by GPS; Oct 26th, 2010, 06:07 PM.


    • #3
      Thanks for the reply.

      I need the header information to the down-stream channels. So it would be handy if it can be set to the Message Headers. With webservices template and interceptors, i am forced to use ThreadLocal which I don't want to use it. Is there a reason why it is not propagated to the Message Headers ?


      • #4

        As of now I have implemented it with ThreadLocal and it is working fine. Is there a better way to get access to the headers ?
        Any help is greatly appreciated.