This component uses the Jakarta Commons Net library which provides access to file systems, jars/zips/bzip2, temporary files, WebDAV, Samba (CIFS), HTTP, HTTPS, FTP and SFTP among others.
It works similarly to the FTP component where it will write files to a directory (on the virtual file system in this case) and poll for files in a file system.
Here is an example of the component configured. First the poller as its much simpler
Wiki Markup |
---|
{snippet:id=poll|lang=xml|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/vfs/example.xml} |
Then here's the sender. We're using a FileMarshaler here to turn JBI messages into files with an expression using XPath from the message content to generate the file name in the directory.
Wiki Markup |
---|
{snippet:id=send|lang=xml|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/vfs/example.xml} |