In this section: How to: Reference: |
The SFTP Read service is used to read a file using SFTP and return the read result.
To configure a SFTP Read service:
For a complete description of the configuration parameters that are available for the SFTP Read service, see SFTP Read Service Parameters.
For a complete description of the edges that are returned by the SFTP Read service, see SFTP Read Service Edges.
The following table lists and describes parameters for the SFTP Read service.
Property Name |
Property Description |
---|---|
File Name |
The special register namespace in which protocol headers from the incoming request will be saved. |
File Name not a Document Tag |
The special register namespace from which protocol headers for the outbound response will be taken. |
Enclose Tag |
The name of the tag that encloses the data read. If omitted, no entagging is used. If used, the output is XML. |
Base Path |
The optional directory to be used if incoming name is not absolute. |
Input Data Format |
The format of the input data, default is flat. |
Transfer Type |
For non-XML, this parameter sets the transfer type. |
Host Name |
The name of the SFTP server to connect to. |
Remote Port |
The port to connect to on the SFTP site. If left blank, the default is port 22. |
User Name |
The username on the SFTP server through which files are emitted. |
Password |
The password for the user account to use when connecting to protocol host. |
Private Key |
The SSH Private Key file used for server authentication (required is password is omitted). |
Pass Phrase |
The SSH Passphrase used when Private Key was generated (optional). |
Encoding |
The character set encoding to be performed on the input. |
Delete After Read |
The flag to show whether to delete the file after the read. |
The following table lists and describes the edges that are returned by the SFTP Read service.
Edge |
Description |
---|---|
success |
Operation completed successfully. |
fail_parse |
Failed to properly parse the input parameters of the service. |
fail_connect |
Failed to connect to SFTP host for any one of the following reasons:
|
fail_operation |
Invalid parms or other error. |
fail_notfound |
The file name in the File Name Tag parameter does not exist on the SFTP host. |
fail_delete |
Failed to delete the file either after the initial read, or when the transaction successfully completed. |
The SFTP Read service is used to read files from a SFTP server (drive on UNIX or Windows). It can also be used in tandem with a file listener to embed file contents (the file picked up by the listener) into the xml file read from the SFTP drive by specifying the tag.
<test>c:\test\a.txt</test>
This is a sftp readagent test
<testout> This is a sftp readagent test </testout>
The following is an example of an SFTP Read Service output.
<?xml version="1.0" encoding="ISO-8859-1" ?> <dir base="/outbound" count="5"> <item type=" directory">Extra Directory</item> <item type="file">1.txt</item> <item type="file">2.txt</item> <item type="file">3.txt</item> <item type="file">ThisIsATest.txt</item> </dir>
iWay Software |