This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
VFS Transport
VFS (Virtual File System) transport implementation is a module which belongs to the Apache Synapse project. Classes org.apache.synapse.transport.vfs.VFSTransportListener
and org.apache.synapse.transport.vfs.VFSTransportSender
implement the listener and sender APIs and the necessary classes can be found in the synapse-vfs-transport.jar
file. Unlike the transports described previously, VFS transport does not have any global parameters to be configured. Rather, it has a set of service level parameters that needs to be specified for each service. VFS transport implementation is mainly used and mostly effective in WSO2 ESB.
The VFS transport implementation is based on Apache Commons VFS implementation. Therefore commons-vfs.jar
file should be included in the Carbon classpath to enable the VFS transport.
VFS Service Level Parameters
Parameter Name | Description | Requried | Possible Values | Default Value |
---|---|---|---|---|
transport.vfs.FileURI | The file URL from where the input files should be fetched. | Yes | A valid file URL of the form file://<path> | Â |
transport.vfs.ContentType | Content type of the files transferred over the transport. | Yes | A valid content type for the files (eg: text/xml) | Â |
transport.vfs.FileNamePattern | If the VFS listener should read only a subset of all the files available in the specified file URI location, this parameter can be used to select those files by name using a regular expression. | No | A regular expression to select files by name (eg:.*\.xml) | Â |
transport.PollInterval | The polling interval in milliseconds for the transport receiver to poll the file URI location. | No | A positive integer | Â |
transport.vfs.ActionAfterProcess | Action to perform over the files after processed by the transport. | No | MOVE, DELETE | DELETE |
transport.vfs.ActionAfterFailure | Action to perform over the files after processed by the transport. | No | MOVE, DELETE | DELETE |
transport.vfs.MoveAfterProcess | The location to move the files after processing. | Required if ActionAfterProcess is MOVE | A valid file URI | Â |
transport.vfs.MoveAfterFailure | The location to move the files after a failure occurs. | Required if ActionAfterFailure is MOVE | A valid file URI | Â |
transport.vfs.ReplyFileURI | The location to which reply files should be written by the transport. | No | A valid file URI | Â |
transport.vfs.ReplyFileName | The name for reply files written by the transport. | No | A valid file name | response.xml |
transport.vfs.MoveTimestampFormat | The pattern/format of the timestamps added to file names as prefixes when moving files (See the API documentation of | No | A valid timestamp pattern (eg: yyyy-MM-dd'T'HH:mm:ss.SSSZ) | Â |
transport.vfs.Streaming | If files should be transferred in streaming mode or not. | No | true, false | false |
transport.vfs.ReconnectTimeout | Reconnect timeout value in seconds to be used in case of an error when transferring files. | No | A positive integer | 30 seconds |
transport.vfs.MaxRetryCount | Maximum number of retry attempts to carry out in case of errors. | No | A positive integer | 3 |
transport.vfs.Append | When writing the response to a file, if the response should be appended to the response file this parameter should be set to true. By default the response file will be completely overwritten. | No | true, false | false |
Please, refer WSO2 ESB sample 254 on how to use the VFS transport in real world applications.