Actions a Client Takes to Submit an XML Document via FTP
To submit an XML document to a target service via FTP, code the client to:
1. Initiate an FTP session on theIntegration Server FTP listening port.
By default the FTP port is assigned to port 8021. However, this assignment is configurable, so check with the Integration Server administrator to determine the port number to use for FTP communications with Integration Server.
2. Point to the target directory where the client is to copy the file containing the XML document.
The target directory is the Integration Server namespace (ns) directory where the target service resides. Use the following format:
cd \ns\folder\subfolder\serviceName
For example, if the target directory is the namespace directory containing the purchasing:submitOrder service, use the following:
cd \ns\purchasing\submitOrder
Important: | Note that the root directory for this operation is your Integration Server’s namespace directory (ns), not the root directory of the target machine. |
3. Copy the XML document to the target directory using the following command, where filename is the name of the file that contains the XML document:
put filename
For example, to copy the PurchaseOrder.xml2 file, use the following:
put PurchaseOrder.xml2
The file that the client sends to Integration Server via FTP is never actually written to the server’s file system. The XML document you send and the output file it produces are written to a virtual directory system maintained in the client’s Integration Server session. When the client ends the FTP session, Integration Server automatically deletes the original file and any results from the session.
Important: | Software AG recommends that you use a unique name for each XML document that you FTP to Integration Server (perhaps by attaching a timestamp to the name) so that you do not inadvertently overwrite other FTPed XML documents or their results during an FTP session. |
If your client is a service running in an Integration Server, instead of coding each of the actions described above, the client can invoke services in the pub.client folder to FTP a file. For information about these services, see the webMethods Integration Server Built-In Services Reference.