You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jeroenvoogt <je...@gmail.com> on 2010/01/04 16:13:11 UTC

How to convert the response of an InOut exchange using XSLT before sending it back to the original calling endpoint?

Hi all,

Does anyone know how I can convert the response of an InOut exchange (so the
out message) using XSLT and pass it on to the original caller?

In my situation, an external system is sending a soap request to the
middleware (Apache ServiceMix and Apache Camel 1.6) which transforms it and
passes it as a HTTP post request to another external system. That system
replies with a XML message. I'd like to transform that message before
sending it back to the original calling system in the soap response.

Thanks!
Jeroen

-- 
View this message in context: http://old.nabble.com/How-to-convert-the-response-of-an-InOut-exchange-using-XSLT-before-sending-it-back-to-the-original-calling-endpoint--tp27014281p27014281.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to convert the response of an InOut exchange using XSLT before sending it back to the original calling endpoint?

Posted by jeroenvoogt <je...@gmail.com>.

Claus Ibsen-2 wrote:
> 
> Usually you just add that transformation as the last step in the route.
> 
> The reply to the original caller is always "whatever the Exchange
> looks like" when the route ends.
> 
Thanks Claus, your reply helped me further and it's now working perfectly.
The output of the external system is sent to the XSL transformer which takes
the output message, and in the end the calling system receives the SOAP
reply. Following is a simplified description of these routes.

The first camel route:
from: consumer soap endpoint
to: http provider endpoint 
to: transformer

The second route:
from: transformer
to: transformer factory

All exchanges here are of course InOut.

Regards,
Jeroen
-- 
View this message in context: http://old.nabble.com/How-to-convert-the-response-of-an-InOut-exchange-using-XSLT-before-sending-it-back-to-the-original-calling-endpoint--tp27014281p27015607.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to convert the response of an InOut exchange using XSLT before sending it back to the original calling endpoint?

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Jan 4, 2010 at 4:13 PM, jeroenvoogt <je...@gmail.com> wrote:
>
> Hi all,
>
> Does anyone know how I can convert the response of an InOut exchange (so the
> out message) using XSLT and pass it on to the original caller?
>
> In my situation, an external system is sending a soap request to the
> middleware (Apache ServiceMix and Apache Camel 1.6) which transforms it and
> passes it as a HTTP post request to another external system. That system
> replies with a XML message. I'd like to transform that message before
> sending it back to the original calling system in the soap response.
>

Usually you just add that transformation as the last step in the route.

The reply to the original caller is always "whatever the Exchange
looks like" when the route ends.


> Thanks!
> Jeroen
>
> --
> View this message in context: http://old.nabble.com/How-to-convert-the-response-of-an-InOut-exchange-using-XSLT-before-sending-it-back-to-the-original-calling-endpoint--tp27014281p27014281.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus