Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
{snippet:id=content|lang=java|url=http://cvssvn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/java/org/servicemix/components/net/FTPTest.java?rev=HEAD}

will generate an XML text file on the FTP server. Here is an example of the FTP configuration on the server side.

Wiki Markup
{snippet:id=sender|lang=xml|url=http://cvssvn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/resources/org/servicemix/components/net/ftp.xml?rev=HEAD}

Using properties to specify the file name or content

...

Wiki Markup
{snippet:id=properties|lang=java|url=http://cvssvn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/java/org/servicemix/components/net/FTPTest.java?rev=HEAD}

You can also use pluggable Expressions to configure the file name and/or file content.

...

Wiki Markup
{snippet:id=expression|lang=xml|url=http://cvssvn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/resources/org/servicemix/components/net/ftp.xml?rev=HEAD}

Polling for files

The FTPPoller will poll the server (with an optional path) for files on the FTP server then download them, fire them into the normalised message router and then delete them from the FTP server. Here's an example of this in action.

Wiki Markup
{snippet:id=poll|lang=xml|url=http://cvssvn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/resources/org/servicemix/components/net/ftpPoll.xml?rev=HEAD}