WebSphere Adapter for FTP

Supported outbound operations

WebSphere® Adapter for FTP supports the operations described in the following table for outbound processing.

Operation Result
Create A file with the specified name is created in the specified directory of the FTP server. The content of the file arrives as either part of the request from the client or it can be retrieved from the local file system where the adapter is running. This content retrieval is configurable. If the file to be created does not exist, the file is created and null is returned to the J2EE application. The file is created in a staging directory (if present) and from there it is moved to the specified directory. If a staging directory is not present, the file is created in the specified directory.

If the file to be created already exists, an FTPFileCreateException exception is sent, the file is not created, and the existing file is not overwritten.

Append The file with the specified name in the specified directory of the FTP server is appended with the content sent across in the request. If the file exists, the content is appended and null is returned to the J2EE application. The file to be appended is copied from the specified directory to the staging directory (if present) and the content is appended to that file in the staging directory. The file is then moved back to the original specified directory. If the staging directory is not present, the content is directly appended to the file in the specified directory. If the file to be appended does not exist, an FTPFileAppendException exception is sent to the calling component.
Delete The file in the specified directory is deleted on the FTP server. After deleting the file, null is returned to the J2EE application. If the file does not exist, an FTPFileDeleteException exception is sent to the calling component.
Retrieve The content of the file, or files, that is specified in the request is returned. If the file, or files, specified in the request exists, the content of the file is retrieved and sent as the response. The file content can either be sent back to the J2EE application as business object or it can be saved to the local file system where the adapter is running. This is configurable. The file names are input as a comma separated list in the fileName attribute. If the files do not exist, an FTPFileRetrieveException exception is sent to the calling component.
Overwrite This operation overwrites the file in the directory with the content specified in the request. If the file to be overwritten exists, the content is overwritten and null is returned to the J2EE application. The file to be overwritten is copied from the specified directory to the staging directory (if used) and the content is overwritten for that file in the staging directory. The file is then moved back to the original specified directory. If the staging directory is not present, the content is overwritten on the file in the specified directory. If the file to be updated does not exist, an FTPFileOverwriteException exception is sent to the calling component.
Exists If the file name in the request exists in the specified directory, the adapter returns the ExistsResponse business object, with the DoesFileExists attribute set to true. If the file name does not exist, or the directory does not exist, the adapter returns the ExistsResponse business object, with the DoesFileExists attribute set to false.
List This operation returns all the file names and subdirectory names in the directory specified in the request. The file names and subdirectory names in the directory are retrieved and sent as a response in the ListResponse business object. If the specified directory does not exist, an FTPFileListException exception is sent to the calling component.
ServerToServer
FileTransfer
Transfers the specified file from one FTP server directory to another FTP server directory. If the request does not contain all of the information about the two servers, the adapter sends an FTPFileServerToServer
FileTransferException exception.
ExecuteFTPScript This operation runs the commands present in an FTP script file in WebSphere Process Server. The operation runs only those commands that are supported by the FTP server and ignores the rest. If the operation fails, it sends an FTPFileExecuteFTPScriptException exception. The script file must not contain connection related commands such as open or connect because the adapter uses an already established connection to run the commands. If the commands in the script file need to be run in a particular directory on the FTP server, then the script file must contain the first command to change to that directory.

Outbound configuration options

WebSphere Adapter for FTP supports the following configuration options for outbound processing:
  • Outbound operations support both active and passive data connection modes. The default mode is active.
  • Files can be transferred in either ASCII or binary mode. The default is binary.
  • You can enable auditing of the commands that are being run during an outbound operation. This information is written to the trace file when the trace level is set to FINEST.
  • Socks proxy settings can be configured if the requests are being passed through an FTP proxy located between the adapter workstation and the FTP server. The proxy settings are configured at the application level and are common for all the ManagedConnectionFactory's and ActivationSpec's used during adapter configuration.
  • If file content is sent from a J2EE application during an outbound create operation, an option is provided to save the file to the adapter workstation before performing the operation.
  • For multiple files to be retrieved during outbound operations, the fileName attribute must contain a comma separated list of file names.
  • ExecuteFTPScript can run before and after outbound operations The script file must not contain connection related commands such as open as we use an already established connection to run the commands.
  • The port number used by the FTP server can be configured in the FTP URL. For Example: ftp://localhost:portNumber
  • The passive data connection mode can be used to connect the adapter to an FTP server through a firewall.
  • Default passwords are stored in plain text in the import and export files. If an Authentication Alias is configured, the actual password is taken from the Authentication Alias of WebSphere Process Server for both inbound and outbound configurations.
  • If using an FTP server when the output of a long list command (ls -l) is different from the default listings supported by Apache commons net 1.4.1 for a different operating system, users can implement their own custom parser to parse the ls -l output.
  • The adapter supports Secure FTP using SSL. It uses passive data connection mode during secure operations.
  • If the FTP connection times out, the adapter detects and reestablishes the lost connection. If unable to establish the connection, the adapter retries for a fixed number of times. The interrupted transfers are not continued. They are lost and the file transfer must be restarted.
  • During outbound create operations, files are created on the staging directory (if present). They are then moved to the actual required directory. This is helpful when a third application starts reading the file before its fully written. The staging directory is also used for Append and Overwrite operations where the specified file is copied to staging directory (if present) first, then appended or overwritten with content and moved back to the actual required directory. If a staging directory is not present, the operation is run in the actual required directory.

Terms of use |

Last updated: Mon 30 Oct 2006 03:48:53

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)