SwitchYard provides support for remote file systems on both sides service and reference.
The ftp binding is built on top of camel-ftp and supports most of options for this endpoint. Please refer camel documentation for detailed description of them.
Generic options
Following options can be apiled to <binding.ftp> <binding.ftps> and <binding.sftp> definition:
FTP specific options
-
passiveMode
-
timeout
-
soTimeout
-
siteCommand
SFTP specific options
-
knownHostsFile
-
privateKeyFile
-
privateKeyFilePassphrase
Binding Services with Files
Supported options are same as for File.
Here's an example of what a file service binding looks like:
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0">
<sca:service name="GreetingService" promote="GreetingService">
<camel:binding.ftp>
<camel:directory>target/input</camel:directory>
<camel:host>localhost</camel:host>
<camel:port>22</camel:port>
<camel:username>camel</camel:username>
<camel:password>secret</camel:password>
<camel:consume>
<camel:initialDelay>50</camel:initialDelay>
<camel:delete>true</camel:delete>
</camel:consume>
</camel:binding.file>
</sca:service>
</sca:composite>
Binding References with File
Binding a reference with file can be used to store outcome of service on remote server. All File referene properties are supported.
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0">
<sca:reference name="GreetingService" promote="camel-binding/GreetingService" multiplicity="1..1">
<camel:binding.ftp>
<camel:directory>target/output</camel:directory>
<camel:autoCreate>false</camel:autoCreate>
<camel:host>localhost</camel:host>
<camel:port>22</camel:port>
<camel:username>camel</camel:username>
<camel:password>secret</camel:password>
<camel:produce>
<camel:fileExist>Override</camel:fileExist>
</camel:produce>
<camel:binding.ftp>
</sca:reference>
</sca:composite>