FTP adapter request and response for a put command
When you use a context item as an input for an adapter request, you must enclose the adapter request in the <request-data> elements. However, when you create a static request, <request-data> is not required and the adapter request starts with the <adapterName-adapter-request> element.
BMC recommends that you do not include unused elements in the adapter configuration because they might cause errors.
The following table describes the elements of an FTP adapter request with a put command.
Elements of an FTP adapter request with a put command
The following figure shows an XML template of the adapter request for the FTP command with put command.
XML template of the FTP adapter request with put command
<ftp-request>
<targets>
<target name=""/>
</targets>
<data-transfer-mode></data-transfer-mode>
<commands>
<put>
<local-file></local-file>
<remote-file></remote-file>
</put>
</commands>
</ftp-request>
The following figure shows an XML sample of the adapter request for the FTP adapter with put command.
XML sample of the FTP adapter request with put command
<ftp-request>
<targets>
<target name="host1"/>
<character-set>Shift_JIS</character-set>
</targets>
<data-transfer-mode>PASSIVE</data-transfer-mode>
<commands>
<put>
<local-file>/path/to/file/filename</local-file>
<remote-file>/path/to/file/filename</remote-file>
</put>
</commands>
</ftp-request>
The put command request for a FTP adapter returns an adapter response containing the summary information for the command.
The following table describes the elements of an FTP adapter response to a request with put command.
Elements of an FTP adapter response to a request with put command
The following figure illustrates an XML sample of the adapter request for the FTP adapter with put command.
XML sample of the FTP adapter response with put 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>put</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>put</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>