FTP adapter request and response for an append command

The following table describes the elements of an FTP adapter request with the append command.

Elements of an FTP adapter request with append command

Element

Description

Required

<targets>

Contains the <target> elements

Conditional; required if a target is referenced or defined in the request

<target>

Contains the name attribute that references a configuration node from the adapter configuration, or contains the elements that define a dynamic target

If you do not provide the value, the default target in the adapter configuration is used.

Conditional; required if a target is referenced or defined in the request

<data-transfer-mode>

Indicates the mode to be used for the FTP data transfer

Valid values: PASSIVE, ACTIVE (default)

No

<commands>

Contains the FTP command and supporting elements

Yes

<append>

Indicates that an append function is performed

It also contains the elements defining the local and remote files that are affected.

Yes

<local-file>

Specifies the local file path, including the file name

This is the source file for the append command.

Yes

<remote-file>

Specifies the remote file path, including the file name

This is the destination file for the append command.

Yes

<character-set>

Specifies the supporting CharSet

CharSet is also called Character Set that includes identifiers describing a series of universal characters.

No

The following figure shows an XML template of the adapter request for the FTP adapter with the append command.

XML template of the FTP adapter request with append command


<ftp-request>
   <targets>
     <target name=""/>
   </targets>
   <data-transfer-mode></data-transfer-mode>
   <commands>
     <append>
     <local-file></local-file>
     <remote-file></remote-file>
     </append>
   </commands>
</ftp-request>


The following figure shows an XML sample of the adapter request for the FTP adapter with the append command.

XML sample of the FTP adapter request with append command


<ftp-request>
   <targets>
     <target name="host1"/>
     <character-set>Shift_JIS</character-set>
   </targets>
   <data-transfer-mode>ACTIVE</data-transfer-mode>
   <commands>
   <append>
     <local-file>/path/to/file/filename</local-file>
     <remote-file>/path/to/file/filename</remote-file>
   </append>
   </commands>
</ftp-request>


The append command request for the FTP adapter returns an adapter response that contains the summary information for the command.

The following table describes the elements of an FTP adapter response to a request with append action.

Elements of an FTP adapter response to a request with append command

Element

Description

<request-metadata>

Contains the request level summary information

<status>

Indicates the status of the request

Valid values: success, error

<error>

Indicates the error message returned when the value of the <status> element is error

When the value of the <status> element is success, this element is absent.

<targets-output>

Contains the command output for all the targets

<target-output>

Contains the command output for a specific target

The host attribute provides the host name or the IP address of the target computer.

<target-metadata>

Contains the target level summary information

<status>

Indicates the status of the target connection

Valid values: success, error

<error>

Contains the error message if a target level error occurs

When the value of the <status> element is success, this element is absent.

<commands-output>

Contains the command responses for all the commands executed on the target computer

<command-output>

Contains the command response for a specific command

<metadata>

Contains the command summary information

<id>

Specifies the sequence in which the command is executed

<command>

Specifies the command executed

<execution-milliseconds>

Specifies the duration of command execution, in milliseconds

<status>

Indicates the status of the command execution

Valid values: success, error

<error>

Contains the error message if a command level error occurs

When the value of the <status> element is success, this element is absent.

<output>

Contains lines that result from the command

This command does not return a detailed response.

The following figure illustrates an XML sample of the adapter response for the FTP adapter with append action.

XML sample of the FTP adapter response with append command


<ftp-command-output>
   <request-metadata>
     <status>success</status>
     <error>Present only with status of 'error'</error>
   </request-metadata>
   <targets-output>
   <target-output host="server1">
     <target-metadata>
       <status>success</status>
       <error>Present only with status of 'error'</error>
     </target-metadata>
     <commands-output>
     <command-output>
     <metadata>
     <id>1</id>
     <command>append</command>
     <execution-milliseconds>value</execution-milliseconds>
     <status>success</status>
     <error>Present only with status of 'error'</error>
     </metadata>
     <output/>
    </command-output>
   </commands-output>
   </target-output>
   </targets-output>
</ftp-command-output>
<ftp-command-output>
   <request-metadata>
     <status>success</status>
     <error>Present only with status of 'error'</error>
   </request-metadata>
   <targets-output>
   <target-output host="server1">
     <target-metadata>
       <status>success</status>
       <error>Present only with status of 'error'</error>
     </target-metadata>
     <commands-output>
     <command-output>
     <metadata>
     <id>1</id>
     <command>append</command>
     <execution-milliseconds>value</execution-milliseconds>
     <status>success</status>
     <error>Present only with status of 'error'</error>
     </metadata>
     <output/>
    </command-output>
   </commands-output>
   </target-output>
   </targets-output>
</ftp-command-output>
Was this page helpful? Yes No Submitting... Thank you

Comments