FTP Connector (Advanced)
This adapter supports FTP (File Transfer Protocol), SFTP (SSH File Transfer Protocol) and FTPS (File Transfer Protocol Secure or FTP-SSL) protocols for sending, receiving, deleting and moving one or more files and folders as well as listing folder contents. The adapter supports proxy servers of the type HTTP
, SOCKS4
, and SOCKS5
.
Properties
Operation (action) | Determines which file transfer operation is performed on the processed files or folders. Possible values:
|
Parameters
Adapter | Main class of the adapter (do not change!) Possible values: en.softproject.integration.adapter. transferadapter.TransferAdapter: Main class (default) |
host | IP address or host name of the FTP(S)/SFTP server Possible values: Any valid string (e.g. |
port | Port number of the FTP(S)/SFTP server Possible values:
|
login | Username for the FTP(S)/SFTP connection |
password | Password for the FTP(S)/SFTP connection; If parameter |
accountInfo | For additional information on the account, see also the FTP library documentation. |
| URL to the XML file in the XStore that contains the login commands. Possible values: Any XStore URL |
filter | Filter expression that can contain the wildcards * and ? to limit the amount of files processed. This applies to the operation Possible values: Any character string (e.g. |
multipleFiles | Process all files that match the filter criterion in parameter Possible values:
|
append | Append sent data to the destination file if a destination file with the same name already exists (only with Operation Possible values:
|
localPath | Local folder for sending or receiving multiple files (only if the parameters Possible values: Any valid path (e.g. |
directoryMode | Enable folder mode to process the content of folders; if parameter Possible values:
|
transferMode | Transmission type Possible values:
|
connectMode | Connection mode Possible values:
|
remotePath | Path on the FTP(S)/SFTP server whose destination folder is to be handled via FTP(S)/SFTP. Possible values: Any string (e.g. |
documentname | Name of the folder or file that will be processed. If Possible values: Any string (e.g. |
oldDocumentname | Name of the file to be moved (only for Operation Possible values: Any string (e.g. |
oldPath | Path to the folder or file on the FTP(S)/SFTP server to be moved (only for Operation Possible values: Any character string (e.g. |
recurse | Delete path recursively, i.e. including all subfolders and files (only with Operation Possible values:
|
deleteAfterReceive | Delete file or folder after receiving from FTP(S)/SFTP server (only with Operation Possible values:
|
deleteAfterSend | Delete file or folder after sending to FTP(S)/SFTP server (only with Operation Possible values:
|
maxTransferRate | Maximum transmission rate in bytes/second Possible values:
|
sleepEnabled | Activate Sleep Mode (if parameter Possible values:
|
sleepTime | Waiting time in seconds between the transfer of the files (if parameters Possible values:
|
timeout | Time limit for TCP connection establishment and transmission in milliseconds Possible values:
|
hostValidationEnabled | Activate host validation to ensure that the requested FTP(S)/SFTP server also corresponds to the FTP(S)/SFTP server to which you are connecting. Ideally, deactivate for test purposes only! Possible values:
|
implicitFTPS | Enable Implicit FTPS Possible values:
|
securityMechanism | Safety mechanism Possible values:
|
privateKeyFile | Path to a private key file (not: Java Keystore). If you want to authenticate yourself on the FTP(S)/SFTP server with a private key, then the password parameter serves as the password for your private key file. Possible values: Any valid path (e.g. |
hostsFileName | Path to the Known Hosts file, which contains a list of confirmed hosts and their associated public keys. Possible values: Any valid path (e.g.
CODE
|
protocol | File transfer protocol Possible values:
|
useProxy | Use proxy server to establish connection Possible values:
|
proxyType | Proxy server type Possible values:
|
proxyAddress | IP address or host name of the proxy server Possible values: Any valid string (e.g. |
proxyPublicAddress | Public IP address or host name of the proxy server if the proxy does not return an address (required e.g. for active FTP transfers if the FTP(S)/SFTP server has to reconnect to the proxy). Possible values: Any valid string (e.g. |
proxyPort | Port number of the proxy server Possible values: Any positive integer |
proxyUsername | Username for the proxy server |
proxyPassword | Password for the proxy server |
controlEncoding | Coding used for the command channel. This influences how umlauts are transmitted in file names. This value depends on the FTP server. Possible values: UTF-8 (Standard)
|
Status values
1 | The operation was executed successfully. |
-1 | The operation failed due to a technical error. |
Input
In file mode (if parameter directoryMode
is deactivated), the Send
operation expects an input document to be sent.
The different login operations have an order. If the respective parameters are filled, applies:
- Login commands are used
- User/Password with
AccountInfo
is used - User/password is used
Definition of the LoginCommands XML:
<loginCommands> <loginCommand>cmd1</loginCommand> <loginCommand>cmd2</loginCommand> </loginCommands>
Output
In file mode (if parameter directoryMode
is deactivated), the received document is output for the operation Receive
.
For the List
operation, an XML document with the list of folders and files is output.