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).
...
In
<ESB_HOME>/repository/conf/axis2/axis2.xml
, in themessageBuilders
section, add the binary message builder as follows:Code Block language html/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 language html/xml <messageFormatter contentType="application/binary" class="org.apache.axis2.format.BinaryFormatter"/>
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 language html/xml <parameter name="transport.vfs.Streaming">true</parameter>
In the same proxy service, before the Send mediator, add the following property:
Info title Note 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 language html/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 | false | false |
transport. vfs . Append | If 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 |
vfs.ssl.keystore | Private 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.kspassword | Private key store password | String | |
vfs.ssl.keypassword | Private key password | String | |
vfs.ssl.truststore | Trust store to use for FTPS | String - Path of keystore | |
vfs.ssl.tspassword | Trust store password | String |
...