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

  • SimpleWebServiceOutboundGateway & Response SOAP Headers

    Hi,

    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 (http://jira.springframework.org/browse/INT-1009) 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.


    -Thanks,
    Ramanan.

  • #2
    Ultimately the request is processed by org.springframework.ws.client.core.WebServiceTempl 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.

    Comment


    • #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 ?

      Comment


      • #4
        Hi,

        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.

        -Regards,
        Ramanan.

        Comment

        Working...
        X