Hi

Welcome on the Camel ride.

Seems you got pretty far on your first day.

About the dynamic to, then there is a EIP pattern for that. We have
added a FAQ about this at
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html


On Thu, Feb 23, 2012 at 6:06 PM, chrisdutz <[email protected]> wrote:
> Hi,
>
> this is actually my first day working with camel and I have to admit I
> allready love it. Currently I am stuck with one last thing to have my first
> camel project up and running.
>
> I have one route that starts by loading xml files from the filesystem. A
> processor then adds a client-id to the requests header based on the content
> of the xml.
>
> My customers requirement is that there are some clients that need special
> processing. For these customers there should be an xsl transformation with
> an uri like this:
> "xslt://file:custom-transformations/${headers.gst}/convert.xslt". I have
> managed to check if the file exists and to use a different path in that
> case. The problem is, that Camel doesn't seem to like dynamic uris ... how
> could I manage to achieve this?
>
> Here a shortend version of my route ...
>        <camel:route>
>            <camel:from
> uri="file:input?move=imported&amp;moveFailed=failed&amp;filter=#xmlInputFilter"/>
>            <camel:convertBodyTo type="org.w3c.dom.Document"/>
>
>            <camel:process ref="gstDataCsvProcessor"/>
>            <camel:choice>
>                <camel:when>
>
>                    <method ref="applyCustomTransformationPredicate"/>
>
>                    <camel:to
> uri="xslt://file:custom-transformations/${headers.gst}/convert.xslt"/>
>                    <camel:to
> uri="xslt://file:xslt/ToEasySPED.xslt?contentCache=false"/>
>                    <camel:to uri="file:output"/>
>                </camel:when>
>                <camel:otherwise>
>                    <camel:to
> uri="xslt://file:xslt/ToEasySPED.xslt?contentCache=false"/>
>                    <camel:to uri="file:output"/>
>                </camel:otherwise>
>            </camel:choice>
>        </camel:route>
>
> I would really appreciate some help with this last step.
>
> Chris
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/dynamic-uri-of-xsl-transformation-tp5508662p5508662.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to