Monday, June 9, 2014

Creating a FTP Poller in Datapower

DataPower provides functionality for FTP and SFTP ing of files.Before going to creation of poller let us look at brief description for FTP and SFTP.

FTP:
File transfer protocol exchanges data in 2 seperate channels
Command channel
Data channel
 Command Channel:
It is responsible for creating client conenction,authentication and exchange of simple FTP commands.It will be open until it gets QUIT command.
Data Channel:
It is responsible for exchanging data like listing,uploading and dowloading the files.Data channel will be closed once the transfer completes.

SFTP:
SSH File Transfer Protocol is based on SSH protocol which provides more security to access the remote servers.
SFTP doesnt exchange data in separate channels but exchanges in packets over a single connection.Data will be transferred in encryption using agreed encryption cipher.

FTP Poller in DataPower:
Step-1:
Go to Objects->Protocol Handlers->Ftp protocol front side handler
Step-2:
Give the name for the handler
Step-3:
Carefully assign required configuration settings
Target Directory: It is specified for giving the target server and directory where the poller will pick the file
Delay Between the polls: It is used to specify time to wait for next polling cycle,time is in milliseconds
Input File match pattern: It is used to specify the regular expression to let poller know which file it has to pick up from the directory

If you choose off for Generate Result file pattern it will enable two required options
Processing Seize Timeout: It is used to specify the time to wait before processing the file that is already in processing state
Processing Seize Pattern: PCRE expression to find which files are in being processed state but not completly processed.
XML Manager: Assign it to an XML manager where it carries the maximum file size settings and User agent which controls the authentication information of FTP servers and client policies.

Step-4:Assign it to a M
Ftp_Poller Example 
PG which will be enabling the poller to start the file transfer process.