Retrieving Local Files from a JMS Queue

In this example, we will retrieve the messages we put on the message queue in post Sending Local Files to a JMS Queue and stored them locally. Edit JMSCopier.java Add the¬†retrieveFileFromJMS method to the JMSCopier class as follows:   JMSCopier.java Edit JMSCopierTest.java Add the method testRetrieveLocalFilesFromJMSQueue to the JMSCopierTest class as follows: JMSCopierTest.java Note, you…

Sending Local files to a JMS Queue

In our next example we will send local files to a JMS Queue and then view the Queue using the console. Edit pom.xml First we need to add the dependencies for JMS as follows: pom.xml Create JMSCopier.java Next we want to create the JMSCopier.java code that will use Camel to send our local files to…

Downloading Files using Camel and SFTP

In this example, we will download files using Camel and SFTP. This is not much of a change from using FTP, except that there is a new dependency we must add to our pom.xml as follows: Update Pom.xml pom.xml Edit FTPCopier.java Edit ftpCopier.java to add the method sftpDownload as follows: FTPCopier.java Edit FTPCopierTest.java Edit FTPCopierTest.java…

Downloading Files using Camel and FTP

In this blog, we will download files from a Server using FTP and store them in a local directory Add Additional Dependencies In order to use FTP we need to add the camel-ftp artifact to the pom.xml as follows: pom.xml Edit FTPCopier.java Create the FTPCopier.java code as follows: FTPCopier.java Edit FTPCopierTest.java Edit FTPCopierTest.java as follows:…

Copying Files using Camel

This post continues on from Copying Files Using Java Edit FileCopier.java Edit the file FileCopier.java to add a new copyFile method, giving the following code FileCopier.java Edit FileCopierTest.java Edit the FileCopierTest.java code to add a second Test Case as follows: FileCopierTest.java Remember to change your inputPath and outputPath to match your own filesystem. Run the…

Copying Files using Java

I’m getting into Camel for the first time, and working through some of the examples in Camel In Action. These posts are my efforts at some of the examples, working on a Mac using Spring STS. The following example is pretty much a copy and paste from the Camel In Action Book, but I’ve broken…