camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bozo Juretic <>
Subject Dynamically selecting a transformation template
Date Sat, 03 Jan 2009 09:47:15 GMT
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 

Thank you and best regards,

Bozo Juretic

View raw message