Available as of Camel 2.11
This example is located in the
examples/camel-example-ftp directory of the Camel distribution.
There is a
README.txt file with instructions how to run it.
This example demonstrates how Camel can upload and download files to/from an existing FTP server.
An existing FTP server should be running.
This example is implemented in Java code, and there is a client and a server application.
The client is used for uploading files from the local file system (from target/upload) to the FTP server.
The server is used for downloading files from the FTP server to the local file system (to target/download).
You can see the Java implementation by opening the
src/main/java/org/apache/camel/example/ftp/MyFtpClientRouteBuilder.java for the client Java route.
And the server example is implemented in the
Running the example
You would need to configure the location and credential for the FTP server. This is done by editing the
Byt default it connects to a non existing domain name, which you therefore must change.
Then you can either run the example as client or server by running from command line with Maven
Or for the server
Instructions is also printed to the console. And you can use ctrl + c to stop the Camel application.