Versions Compared

Key

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

The Virtual File System (VFS) transport is used by WSO2 ESB to process files in the specified source directory. After processing the files, it moves them to a specified location or deletes them. Note that files cannot remain in the source directory after processing or they will be processed again, so if you need to maintain these files or keep track of which files have been processed, specify the option to move them instead of deleting them after processing. If you want to move files into a database, use the VFS transport and the DBReport mediator (for an example, see Sample 271: File Processing).

...

  1. In <ESB_HOME>/repository/conf/axis2/axis2.xml, in the messageBuilders section, add the binary message builder as follows:

    Code Block
    languagehtml/xml
    <messagebuilder<messageBuilder contenttypecontentType="application/binary" class="org.apache.axis2.format.BinaryBuilder"/>

    and in the messageFormatters section, add the binary message formatter as follows:

    Code Block
    languagehtml/xml
    <messageFormatter contentType="application/binary" class="org.apache.axis2.format.BinaryFormatter"/>
  2. In the proxy service where you use the VFS transport, add the following parameter to enable streaming (see VFS service-level parameters below for more information):

    Code Block
    languagehtml/xml
    <parameter name="transport.vfs.Streaming">true</parameter>
  3. In the same proxy service, before the Send mediator, add the following property:

    Info
    titleNote

    You also need to add the following property if you want to use the VFS transport to transfer files from VFS to VFS.

    Code Block
    languagehtml/xml
    <property name="ClientApiNonBlocking" value="true" scope="axis2" action="remove"/>

    Anchor
    parameters
    parameters

...

Parameter Name

Description

Possible Values

Default Value

vfs.passive

Enable FTP passive mode. This is required when the FTP client and server are not in the same network.

true | falsefalse
transport. vfs . AppendIf file with same name exists, this parameter tells whether to create a new file and write content or append content to existing file

true | false

false
vfs.protection

Set data channel protection level using FTP PROT command

  • C - Clear
  • S - Safe(SSL protocol only)
  • E - Confidential(SSL protocol only)
  • P - Private
C
vfs.ssl.keystorePrivate key store to use for mutual SSL. Your keystore must be signed by a certificate authority. For more information, see http://docs.oracle.com/cd/E19509-01/820-3503/ggfen/index.html.String - Path of keystore 
vfs.ssl.kspasswordPrivate key store passwordString 
vfs.ssl.keypasswordPrivate key passwordString 
vfs.ssl.truststoreTrust store to use for FTPSString - Path of keystore 
vfs.ssl.tspasswordTrust store passwordString 

...