Ftp connector

9
FTP Connector PRUDHVI

Transcript of Ftp connector

Page 1: Ftp connector

PRUDHVI

FTP Connector

Page 2: Ftp connector

PRUDHVI

FTP Connector

• The FTP Connector implements a file transport channel so that your Mule application can exchange files with an external FTP server. You can configure FTP as an inbound endpoint (which receives files) or outbound endpoint (which writes files to the FTP server)

Page 3: Ftp connector

PRUDHVI

Configuration

FTP endpoint configuration consists of two stages:• Decide where you want to place the FTP endpoint within your Mule flow, then drag it from the

palette to the appropriate place in the sequence of building blocks that make up your Mule flow.• If you place the FTP endpoint at the beginning of the flow, it acts as an inbound endpoint (such as,

message source), triggering the flow whenever it receives a file. (You can also use the Composite Source scope to wrap the FTP endpoint along with other, similar endpoints (such as SFTP, File, or UDP) so that your flow can receive files through multiple transport channels).

• If you place the FTP building block in the middle or at the end of the flow, it serves as an outbound endpoint, transferring files out of the flow to the connected file system (such as, the FTP server).

• Configure the FTP endpoint by providing values for the fields on the various tabs in the properties editor, which you open by clicking the FTP endpoint icon on the Message Flow canvas.

Page 4: Ftp connector

PRUDHVI

The tabs on the FTP

Page 5: Ftp connector

PRUDHVI

Advanced Tab

Page 6: Ftp connector

PRUDHVI

Transformers Tab

Page 7: Ftp connector

PRUDHVI

Features

• oll a directory on a remote FTP server for new files• Retrieve files an FTP server• Transfer binary or text files• Filter files at the endpoint based on filename wildcards• Filter files at the endpoint based on Mule expressions• Upload and store files on an FTP server• Rename output files based on Mule expressions• Streaming for transferring large files• Support for reconnection strategies

Page 8: Ftp connector

PRUDHVI

Example Flow<mule xmlns="http://" xmlns:xsi="http://www.w3.org/2001/XMLSchewww.mulesoft.org/schema/mule/corema-instance" xmlns:ftp="http://www.mulesoft.org/schema/mule/ftp" xmlns:file="http://www.mulesoft.org/schema/mule/file" xsi:schemaLocation=" http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/current/mule-ftp.xsd">

<flow name="ftp2file"><ftp:inbound-endpoint host="localhost" port="21" path="/" user="theUser"

password="secret"/><file:outbound-endpoint path="/some/directory"

outputPattern="#[header:originalFilename]"/></flow>

</mule>

Page 9: Ftp connector

PRUDHVI

Thank You