About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Question & Answer
Question
What is the syntax for using the WebSphere FTP Adapter with the Launcher and Command Server to "get" files?
Answer
To "get" files, using the WebSphere FTP adapter you can configure the WebSphere Transformation Extender (WTX) Launcher to listen for files that arrive in a particular location or use the WTX Command Server to "get" an individual file from another server.
Example maps are provided in the examples\adapters\WebSphere_adapters\WS_FtpIn subdirectory of your WTX installation when you perform a Custom Install of the Design Studio. The discussion below will use the FtpMap.mms map source and the associated FtpMap for reference purposes.
To configure the Command Server to "get" files via FTP:
- Open the FtpMap.mms map source in the Design Studio and select input card 1 in the FtpIn map.
- Double click on input card 1 so that the Edit Input Card window is displayed
- Edit the SourceRule - GET - Source Command to contain the following information:
-TV <trace file name> -is:directoryPath <get directory> -is:Filename <filename> -is:functionName Retrieve -is:dataConnectionMode active -is:fileTransferType ASCII -wtx:typename RetrieveResponseWrapper -wtx:uri http://www.ibm.com/xmlns/prod/websphere/j2ca/ftp/retrieveresponsewrapper -wtx:ispec com.ibm.j2ca.ftp.FTPFileInteractionSpec -wtx:record com.ibm.j2ca.ftp.record.FTPInputStreamRecord -mcf:adapterID 001 -mcf:hostName <hostname> -mcf:userName <username> -mcf:password <password > -mcf:protocol FTP -mcf:PortNumber 21 -mcf:secondServerProtocol FTP -wtx:odatabinding com.ibm.j2ca.ftp.emd.runtime.FTPFileWTXRetrieveDataBinding -wtx:schemadir "C:\IBM\WebSphere Transformation Extender 8.4.1\examples\adapters\WebSphere_adapters\WS_FtpIn\CommonSchemas"
- Modify the above sytnax to reflect your <username>, <password>, <hostname>, <get directory>, <trace file name> and <filename>
- Set the TransferType to be ASCII or binary based on your requirements. The default is binary.
- Modify the -wtx:schemadir to reference where your CommonSchemas directory is located. If your runtime platform is non-Window, copy the contents of this directory to your runtime platform. If the schemadir location includes spaces, you must enclose the schemadir in double quotes.
- To use SFTP, change both the -mcf:secondServerProtocol and -mcf:protocol to be SFTP and the -mcf:PortNumber to 22
- The -TV <trace file name> is optional and should only be using for development/testing of your map. It is suggested you remove this option when you place the map into production.
- Compile the map for the appropriate platform and deploy it to your runtime platform.
- Execute the map
To configure the Launcher to "get" files via FTP:
- Open the FtpIn.msd file in the Integration Flow Designer (IFD)
- Right click on the FtpIn map in the IFD and select "Edit Map Component" and then modify the Executable Map File to reflect the location where this map will be executed from and then click on OK.
- Right click on the FtpIn map in the IFD and select "Edit Launcher Settings..."
- In the Launcher Settings window, expand Input(s) - #1 In1 - GET - Source - Command and edit the command to contain the following:
-TV -wtx:schemadir "C:\IBM\WebSphere Transformation Extender 8.4.1\examples\adapters\WebSphere_adapters\WS_FtpIn\CommonSchemas" -as:userName <username>-as:eventDirectory <listening directory> -as:hostName <hostname> -as:eventFileMask <file pattern to get> -as:localEventDirectory <directory to ftp files to> -as:sortEventFiles no sort -as:password <password> -as:protocol FTP -as:portNumber 21 -as:retryInterval 60001 -as:pollQuantity 11 -as:pollPeriod 2001 -as:assuredOnceDelivery true -as:BONamespace http://www.ibm.com/xmlns/prod/websphere/j2ca/ftp -wtx:uri http://www.ibm.com/xmlns/prod/websphere/j2ca/ftp/ftpfile -wtx:typename FTPFile
- Modify the above sytnax to reflect your <username>, <password>, <hostname>, <listening directory> and <directory to ftp files to>
- Modify the eventFileMask entry to reflect the type of files you want to retrieve. If you want all files that end in .xml, you would specify:
-as:eventFileMask *.xml
- Modify the -wtx:schemadir to reference where your CommonSchemas directory is located. If your runtime platform is non-Window, copy the contents fo this directory to your runtime platform. If the schemadir location includes spaces, you must enclose the schemadir in double quotes.
- To use SFTP, change the -as:protocol to SFTP and -as:portNumber to 22
- The -TV <trace file name> is optional and should only be using for development/testing of your map. It is suggested you remove this option when you place the map into production.
- Save the changes to the IFD
- Right click on the system in the IFD and select Deploy - Definitions. Review the definitions to ensure the maps and system will be deployed to the appropriate server and directories.
- Once the definitions are confirmed, right click on the system and select Deploy - <System definition name>
- Once the deploy is successful, start the launcher and test
[{"Product":{"code":"SSVSD8","label":"IBM Transformation Extender"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"FTP Adapter","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.3;8.4;8.4.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Product Synonym
Ascential Mercator WTX DTX DSTX Transformation Extender
Was this topic helpful?
Document Information
More support for:
IBM Transformation Extender
Software version:
8.3, 8.4, 8.4.1
Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows
Document number:
524713
Modified date:
16 June 2018
UID
swg21695089