You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by mywish <my...@gmail.com> on 2012/09/24 06:46:30 UTC

camel-ftp via proxy

Hi,
I am trying using camel-ftp to route file to ftp server via proxy.
But as I know, camel-ftp don't support proxy.
FTP4J is not a component of apache camel.

So I tried to using a custom ftpClient like this:
FTPClient client = new FTPClient();
System.getProperties().put("socksProxyPort", "8089");
System.getProperties().put("socksProxyHost","localhost");

client.addProtocolCommandListener(new PrintCommandListener(
		new PrintWriter(System.out)));

client.setConnectTimeout(2000);
client.setDefaultTimeout(2000);

SimpleRegistry registry = new SimpleRegistry();
registry.put("client", client);

from("file://dir").to("ftp://localhost:21/test?username=guest&password=guest&binary=true&ftpClient=#client");

But I got following error:
Caused by: java.lang.IllegalArgumentException: Could not find a suitable
setter for property: ftpClient as there isn't a setter method with same
type: java.lang.String nor type conversion possible: No type converter
available to convert from type: java.lang.String to the required type:
org.apache.commons.net.ftp.FTPClient with value #client

I think ftp component doesn't support ftpClient option. but
http://camel.apache.org/ftp2.html, there is an option like that.

Can someone help me with that error?
Is there another way to support ftp via proxy in camel?



--
View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-via-proxy-tp5719819.html
Sent from the Camel Development mailing list archive at Nabble.com.