Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Processing Flat Files | Sending and Receiving Flat Files | Submitting a Flat File to Integration Server via FTP
 
Submitting a Flat File to Integration Server via FTP
 
FTPing a File From a webMethods Integration Server
Getting Results from an FTP’d Document
You can FTP a flat file to the Integration Server’s FTP listening port. By default the FTP port is assigned to port “8021.” However, this assignment is configurable, so you should check with your Integration Server administrator to see which port is used for FTP communications on your Integration Server.
When the Integration Server receives a flat file on the FTP listening port, it passes it as an InputStream to the service in the directory to which the file was FTP’d.
To submit a flat file to the Integration Server via FTP, the service to which you want to pass the document must take an InputStream as input for the ffdata variable.
If you want to submit a flat file to a service through FTP, the application must specify certain information.
*To submit a flat file via FTP
1. Initiate an FTP session on the Integration Server’s FTP listening port.
2. Point to the directory that contains the service to which you want to pass the flat file. For example,
cd \ns\Purchasing\SubmitOrder
Note:
Note that the root directory for this operation is your Integration Server’s namespace directory (ns), not the root directory of the target machine. Therefore, if you want to FTP a file to a service in the Purchasing folder, you use \ns\Purchasing\ServiceName as the path to that service, not Integration Server_directory \instances\instance_name\ns\Purchasing\ServiceName. Each folder in Designer is treated as a directory when FTPing to the Integration Server. For example, for the purchasing.purchaseRequests:rfq service, the directory name would be \ns\purchasing\purchaseRequests\rfq.
3. Copy the flat file to this directory using the following command:
put sourceflatfile.txt destinationflatfile.txt;file content type
Where sourceflatfile.txt is the name of source file that you want to pass to the Integration Server, destinationflatfile.txt is the name of the destination file, and application:x–wmflatfile indicates the content type of the file submitted. For example, to put a document called PurchaseOrder.txt on the Integration Server as Partner1PO.txt, you would use the following FTP command:
put PurchaseOrder.txt Partner1PO.txt;application:x–wmflatfile
Note that the file you FTP to the Integration Server is never actually written to the server’s file system. The file you send and the output file it produces (see below) are written to a virtual directory system maintained in your Integration Server session.