camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neilac333 <neil.chaudh...@soteradefense.com>
Subject Re: Output File Name After Exec
Date Thu, 10 Jan 2013 16:11:59 GMT
Thanks for your responses. 

To answer the first question, here is the route I have so far:

from("servlet:///my-endpoint")
            .to("exec:${shellScriptPath}?outFile=${outFilePath}")
            .convertBodyTo(String.class)
            .bean(new DataProvider())
            .marshal(jsonDataFormat)

What I would like to do is replace the convertBodyTo with something that
would send ${outFilePath}--the outFile /name/--as the message body. As it
stands now, the outFile /contents/ are the message body.

As for Claus' solution, I am familiar with the transformer EIP, but I am not
sure how to apply it. In other words, I am not sure how to transform
/org.apache.camel.components.exec.ExecResult/ into a string with the outFile
value.

I would appreciate some clarification on what I'm missing.

Thanks.




--
View this message in context: http://camel.465427.n5.nabble.com/Output-File-Name-After-Exec-tp5725152p5725303.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message