Re: Naming your file with org.apache.camel.file.name

2012-09-04 Thread Saurabh
Hi Friends, I am working on a small spike in which my task is to pick an xml from a directory, put it on jms queue and save the xml to some other directory. This is the code snapshot, this is after I converted the file contents in to a string. private static final String URI =

RE: Naming your file with org.apache.camel.file.name

2012-09-04 Thread DEPREZ Arnaud AWL-IT
atosworldline.be  please don't print unless you really need to -Original Message- From: Saurabh [mailto:computerfres...@gmail.com] Sent: mardi 4 septembre 2012 13:42 To: users@camel.apache.org Subject: Re: Naming your file with org.apache.camel.file.name Hi Friends, I am working on a small

RE: Naming your file with org.apache.camel.file.name

2012-09-04 Thread Saurabh
Thanks Arnaud for the reply I feel I was not able to describe myself fully in my last post. In the example below I am picking a xml file src/data/message1.xml and putting it in a queue test.MyQueue. After listen this using camel, as shown in camel context and pass this message in target/test

Re: Naming your file with org.apache.camel.file.name

2010-02-21 Thread watcher
Try setting name like this message.setHeader(Exchange.FILE_NAME, filename); -- View this message in context: http://old.nabble.com/Naming-your-file-with-org.apache.camel.file.name-tp27652312p27676753.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Naming your file with org.apache.camel.file.name

2010-02-21 Thread lekkie
This worked. Thanks watcher wrote: Try setting name like this message.setHeader(Exchange.FILE_NAME, filename); -- View this message in context: http://old.nabble.com/Naming-your-file-with-org.apache.camel.file.name-tp27652312p27683863.html Sent from the Camel - Users mailing list

Re: Naming your file with org.apache.camel.file.name

2010-02-19 Thread Claus Ibsen
Its a HEADER not a property that you can use to set the filename. On Fri, Feb 19, 2010 at 11:39 AM, lekkie lekkie.ay...@gmail.com wrote: Hi, After going through this doc http://camel.apache.org/file.html, I understand I can set the filename by setting org.apache.camel.file.name value. I

Re: Naming your file with org.apache.camel.file.name

2010-02-19 Thread lekkie
Thanks for pointing that out. I changed that to this and it remaind the same byte[] data = exchange.getContext().getTypeConverter().convertTo(byte[].class, dh.getInputStream()); Message newMessage = exchange.getIn();