In and Out messages in XSLT

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

In and Out messages in XSLT

RomKal
Hello!

Is there a way to transform some response (out message) with xslt
transformation?

As far as I can see in XsltBuilder, it works only on In messages. This
means that even if I set out->in it will transform it, but then
pipeline will propagate only out message (that is not transformed at
all).

Is there any fancy way to make it work?

Anyway what is the correct way of working with in/out messages? It
looks that at the moment you will create some out message then there
is no reason to work on In message, because 1) out messages are always
propagated, and 2) there is no easy way to erase out message.

Romek
Reply | Threaded
Open this post in threaded view
|

Re: In and Out messages in XSLT

jstrachan
On 30/10/2007, Roman Kalukiewicz <[hidden email]> wrote:
> Hello!
>
> Is there a way to transform some response (out message) with xslt
> transformation?
>
> As far as I can see in XsltBuilder, it works only on In messages. This
> means that even if I set out->in it will transform it, but then
> pipeline will propagate only out message (that is not transformed at
> all).

So the idea is each processor typically takes some IN and generates
some OUT; then those can be chained together into pipelines so that
the right message is sent to where you need it.

So if you do something like

from("activemq:foo").to("xslt:foo.xslt").to("activemq:bar");

it should take the message from the foo queue, transform it and send
it to the bar queue.

I just noticed that the XsltBuilder was not correctly setting the OUT;
have patched this in trunk.

I've also just added the XSLT endpoint as shown above.
http://cwiki.apache.org/CAMEL/xslt.html

--
James
-------
http://macstrac.blogspot.com/

Open Source SOA
http://open.iona.com