JBoss Community Archive (Read Only)

SwitchYard 0.7

FTP FTPS SFTP

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.

SwitchYard 0.7

This binding have it's own namespace. To use it you must declare namespace with uri urn:switchyard-component-camel-ftp:config:1.0. Your Maven project should also have following dependency:

  <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-camel-ftp</artifactId>
      <version>SWITCHYARD-VERSION</version>
  </dependency>

Generic options

Following options can be apiled to <binding.ftp> <binding.ftps> and <binding.sftp> definition:

  • host

  • port

  • username

  • password

  • binary

  • connectTimeout

  • disconnect

  • maximumReconnectAttempts

  • reconnectDelay

  • separator

  • stepwise

  • throwExceptionOnConnectFailed

FTP specific options

  • passiveMode

  • timeout

  • soTimeout

  • siteCommand

FTPS specific options

  • securityProtocol

  • isImplicit

  • execPbsz

  • execProt

  • disableSecureDataChannelDefaults

SFTP specific options

  • knownHostsFile

  • privateKeyFile

  • privateKeyFilePassphrase

Binding Services with Files

Supported options are same as for File Binding.

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 Binding 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>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 09:47:13 UTC, last content change 2012-12-28 14:43:17 UTC.