Announcement Announcement Module
Collapse
No announcement yet.
Redirect to another target Url in EndpointInterceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redirect to another target Url in EndpointInterceptor

    Hi,

    in the soap header of a client's message call to my web service is given a specific different target url which I have to send the response message to. So the soap header of the request message looks like this:

    <soapenv:Envelope ...>
    <soapenv:Header>
    <xy:ReplyTo>
    <xy:address>http://...</xy:adress>
    ...
    </soapenv:Header>
    ...
    </soapenv:Envelope ...>

    How can I redirect my response to that different target url in <ReplyTo><address> ? My solution till now is a EndpointInterceptor which makes in the method handleResponse a Web Service call by using

    WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
    StreamSource source = new StreamSource(new StringReader(responseMessage.toString()));
    StreamResult result = new StreamResult();
    webServiceTemplate.sendSourceAndReceiveToResult(ad dress, source, result);
    return false; // to omit the direct response of spring to requestUrl

    Is there another solution for that problem ? Sorry I'm newbie to spring ws...
Working...
X