camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" <>
Subject Re: Dynamically selecting a transformation template
Date Sat, 03 Jan 2009 10:30:50 GMT

Sounds like the dynamic recipient list EIP pattern

You can add a header with the destination. The header value should
then be: "xquery:" + myDynamicTemplate

On Sat, Jan 3, 2009 at 10:47 AM, Bozo Juretic <> wrote:
> Hello all,
> I have a normalized XML message on the input of a route and would like to
> transform this message using the XQuery to the intermediary format used by
> the MINA encoder in the next phase, but based on some message properties
> (protocol, upstream connection etc.) I would send this message to the
> specific to().
> What I'm doing is taking the message and sending it
> to("xquery:someTemplate"). This all works well. The question is how do I
> actually dynamically insert a templateName (location of a XQuery template),
> based on some of the message properties?
> I would like to have some variable which I can place in to("xquery:" +
> myDynamicTemplate). I have many templates thus creating one big choice()
> would defeat the purpose of using Camel Java DSL as a simple routing
> language.
> Thank you and best regards,
> Bozo Juretic


/Claus Ibsen
Apache Camel Committer

View raw message