You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sathiyaraja <sa...@hotmail.com> on 2014/12/02 02:50:04 UTC
Dynamic routing to a XSL file
Hi,
In my implementation i have some 30 to 40 xsl files. So i have to route
the input message to any one of the xsl based on the input element.
This is my input message.,
<xml><value>ABCD</value><name>Sathiya</name></xml>
I have a xsl file with name., ABCD-Req.xsl
My current Implementation.,
<route>
<from uri="inputlocation">
<setProperty name="value">
<xpath>/xml/value/text()</xpath>
</setProperty>
<to uri="xslt:.../${property.value}-Req.xsl/>
</route>
This is not working. as the file language does not supports simple language.
I have also tried recipientlist simple language is working there but in my
implementation it should pick from exchange property as given above,
<camel:recipientList>
<camel:simple>xslt://${property.value}-Req.xsl</camel:simple>
</camel:recipientList>
Is there any other way to do this.
Thanks in advance..
Sathiyaraja P
--
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-routing-to-a-XSL-file-tp5759884.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Dynamic routing to a XSL file
Posted by sathiyaraja <sa...@hotmail.com>.
Thanks Guru..
Its propertyName inside setProperty.. wrongly typed in this post.
I could able to log the property also.
Inside recipientlist i cant able to use any camel exchange
properties(headers or property). But i tried with xpath and its working fine
But in my case it should read from the property.
In stacktrace im getting cannot locate the file.
Warm regards,
Sathiya
--
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-routing-to-a-XSL-file-tp5759884p5759958.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Dynamic routing to a XSL file
Posted by Gnanaguru S <gn...@gmail.com>.
Well, can you post your stack trace ?
Recipient list should work. You can try with exchange header instead. (
Still I cant help without seeing the stacktrace)
Have you printed the value stored in the property ? Sometimes if you dont
use resultType in xpath, camel doesnt store string in property/header.
By the way, in setProperty is it name or propertyName ?
Cheers
Guru
--
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-routing-to-a-XSL-file-tp5759884p5759899.html
Sent from the Camel - Users mailing list archive at Nabble.com.