What version of Camel are you using?

The Spring XML ought to work. What doesnt work?

On Mon, Dec 6, 2010 at 6:47 PM, bbuzzard
<billy.buzz...@bnsflogistics.com> wrote:
>
> I created a route in Java that passed the filename to a Camel Exec function
> like this:
>
>  public void configure() throws Exception {
>    from("file:c:/aaa/FromZip")
>    .setHeader("CamelExecCommandArgs", simple(" ${file:name}"))
>    .to("exec:c:/aaa/Scripts/test.bat");
> }
>  and this worked perfectly.  How would I define this route using SpringDSL?
>
> I unsuccessfully tried the following:
>
>  <route>
>     <from uri="file:c:/aaa/FromZip"/>
>     <setHeader
> headerName="CamelExecCommandArgs"><simple>${file:name}</simple></setHeader>
>     <to uri="exec:c:/aaa/Scripts/test.bat"/>
>  </route>
>
> It would be really nice if I could get something like the following to work:
>
>  <route>
>     <from uri="file:c:/aaa/FromZip"/>
>     <to uri="exec:c:/aaa/Scripts/test.bat?args=${file:name}"/>
>  </route>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Passing-filename-to-EXEC-tp3294381p3294381.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to