Document Delivery Version 101 XML Tags: FTP

About this task

  • XML Tags: FTP.
  • FTP specific guidelines.
  • Examples: FTP.

XML Tags: FTP

There is now a mechanism for doing small FTP commands before and after the actual delivery.

For instance, you might be required to manually change the directory before the delivery takes place, and then change the directory back to the root when finished.

To accomplish this, the Pre and Post commands can be used.

XML Tag Description
<Header> The main wrapper tag for the XML style header. There are no attributes for this tag
<DestinationFilename> Contains the remote destination filename. There are four attributes for all systems for this tag:
Filename: The remote destin
  • ation filename to be delivered to.
  • Rename: Allows the file to be renamed during the delivery process. Options are: Yes and No. "Yes": (Default) The rename feature can be used. "No": The rename feature cannot be used. Important: If this condition is found on an APPEND type delivery, the delivery will fail; APPEND deliveries must be able to rename.
  • KeepConnectionOpen: Options are Yes and No. "Yes": An FTP connection will stay open. "No": An FTP connection is not forced to stay open.
  • overrideKeepConnectionOpen: Options are Yes and No. "Yes": Enables ability to override the open FTP connection so the connection can close. "No": Does not allow an override to the open FTP connection tag.
PreCommands Wrapper for all Pre commands that are to be attempted before the delivery occurs. There are no attributes for this tag.
PreCommand Holds one FTP command to take place before the delivery occurs. The raw FTP command is written verbatim in the command attribute. There is one attribute for this tag. command: The command to be sent.
PostCommands Wrapper for all the Post commands that are to be attempted after the delivery is completed. There are no attributes for this tag.
PostCommand Holds one FTP command to take place after the delivery is successfully completed. The raw FTP command is written verbatim in the command attribute. There is one attribute for this tag. command: The command to be sent.
guide: FTP specific guidelines
  • Multiple PreCommand and PostCommand tags may be used.
  • The total size of the header including the version, null characters and Carriage Return Line Feed cannot exceed 4096 bytes.
  • Failures in the delivery process are treated as follows.
If the following fails: Result
Pre commands Delivery and the post commands are not processed. Delivery is considered to be failed.
Delivery Post commands are not processed. Delivery is considered to be failed.
Post commands Delivery is considered to be failed.
Note: If the actual delivery of the remote file succeeds and the commands fail, subsequent delivery attempts will try to do only the pre and post commands since the delivery of the actual file has already succeeded.
  • If Pre and Post commands are used for Network or HTTP deliveries, the header will be considered invalid, and the output document will be flushed.

FTP Example: using Pre and Post commands

Procedure

  1. Simple file
    101 <Header>
    ????????<DestinationFilename filename="remoteFilename.txt"/>
    </Header>
    Data
  2. Files using all tags

    A

    101 <Header>
    ????????<PreCommands>
    ????????????????<PreCommand command="SITE Stats"/>
    ????????</PreCommands>
    ????????<DestinationFilename filename="remoteFilename.txt" rename="No"/>
    ????????<PostCommands>
    ????????????????<PostCommand command="SITE file=yes"/>
    ????????</PostCommands>
    </Header>

    B

    101 <Header>
    ????????<PreCommands>
    ????????????????<PreCommand command="CWD subdirectory"/>
    ????????</PreCommands>
    ????????<DestinationFilename filename="DestinationFilename.txt" rename="yes"/>
    ????????<PostCommands>
    ????????????????<PostCommand command="CDUP"/>
    ????????</PostCommands>
    </Header>
    Data to be sent.

    FTP Example: Using Connection Open commands

    This example will force the connection to close after the delivery has been completed.

    <DestinationFilename
    ????????filename="FTP_O_RemoteFilename230.txt"
    ????????rename="Yes"
    ????????overrideKeepConnectionOpen="YES"
    ????????keepConnectionOpen="No"/>