It worked with the convertBodyTo.
By using only the from(ftpReceive).setHeader(FileComponent.HEADER_FILE_NAME,
constant("deleteme17.txt")).to(fileUrl);
I got an exception:
SEVERE: Failed delivery for exchangeId: ID-nx-7400/4313-1207045487265/0-1.
On delivery attempt: 0 caught: org.apache.camel.InvalidPayloadException: No
in body available of type: java.io.InputStream but has value: sdfffffffffff
I have switched to Camel 1.3.
Thanks,
misge wrote:
>
> Hello,
> I'm using the following in order to fetch a file though FTP and then store
> it locally in my client. As a result, i have a directory created instead
> of a file even though that i set the FileComponent.HEADER_FILE_NAME.
> I'm getting the same behaviour with or without the
> FileComponent.HEADER_FILE_NAME set.
>
> String ftpReceive =
> "ftp://[EMAIL
> PROTECTED]:21/Adobe/delme.txt?password=xxx&binary=false&directory=false";
>
> from(ftpReceive).setHeader(FileComponent.HEADER_FILE_NAME,constant("delmeTo.txt")).to("file:inputdir/?append=false&noop=true");
>
> I'm using mina 1.2.0
>
> Regards,
>
>
--
View this message in context:
http://www.nabble.com/FTP-to-FILE-tp16354813s22882p16417867.html
Sent from the Camel - Users mailing list archive at Nabble.com.