embed resources like xsl files into routes

One Star

embed resources like xsl files into routes

Hello,
I use an external xsl to manipulate xml data.
Is there a place in talend where I could put these kind of resources so that they are bundled with the route at the time of deployment?
It could be useful also for velocity templates...
One Star

Re: embed resources like xsl files into routes

Hi ytuzet,
how about placing your XSL files into your resource folder?
As an example:
(1) Place your XSL sheets into your '${project.base}/src/main/resources/test.xsl'
(2) Implement a camel route that calls this file and place it into your 'META-INF/spring' folder. You may take a look at the example below:
<camel:route>
<camel:from uri="vm:incomming" />
<camel:choice>
<camel:when>
<camel:simple>${body} contains 'demo success'</camel:simple>
<camel:to uri="bean:demo?method=process" />
</camel:when>
<camel:when>
<camel:simple>${body} contains 'demo fault'</camel:simple>
<camel:to uri="xslt:test.xsl"/>
<camel:to uri="bean:demo?method=process" />
</camel:when>
</camel:choice>
</camel:route>

(3) Build your project and test it, it should work.
For further information you may als want to read the following article: http://camel.apache.org/xslt.html
Hope this helps a bit,
Many greets,
Christoph
One Star

Re: embed resources like xsl files into routes

Hi cemmersb,

That's the point, I know where to put resources in typical camel project, but in talend there is no access to project folder ...
One Star

Re: embed resources like xsl files into routes

Hi ytuzet,
unfortunately I've never worked too much with the talend Studio. Therefore I'm probably the wrong person to help you with this topic.
Maybe there is someone out there who can guide you a bit better through that topic.
Anyway, I'm still interested in the solution you find, since there might be some chances to use the Studio in the future.
Many greets,
Christoph
One Star

Re: embed resources like xsl files into routes

for the moment I make my camel Contexts with maven archetypes outside the studio
there are still missing features like this one in talend studio (perhaps they're hidden...)
thx for the reply