Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

File Transfer Protocol (FTP) Endpoint Reference

EndpointFTP

File Transfer Protocol (FTP) Endpoint Reference

Overview

The FTP endpoint 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).

Configuration

FTP endpoint configuration consists of two stages:

  1. 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.

  2. If you place the FTP endpoint at the beginning of the flow, it will act as an inbound endpoint (i.e., 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).
    +

  3. If you place the FTP building block in the middle or at the end of the flow, it will serve as an outbound endpoint, transferring files out of the flow to the connected file system (i.e., the FTP server).

    check The title at the top of the Properties pane, which will says either “Inbound Endpoint” or “Outbound Endpoint” reveals whether your endpoint is set up to send or recieve files.
  4. Configure the FTP endpoint by providing values for the fields on the various tabs on the Properties pane, which you open by double-clicking the FTP endpoint icon on the Message Flow canvas.

The four tabs on the FTP Properties pane display the various attributes you can configure for this endpoint. The following sections each cover one tab.

General Tab

This tab covers the attributes users most frequently choose to set. None are required for this particular tab, since Mule uses a default value whenever a user declines to set an attribute manually.

FTPgeneral

Property Description

Display Name

Defaults to the generic endpoint name (FTP). MuleSoft recommends that you change this display name, which must be alpha-numeric, to reflect the endpoint’s specific role, i.e. File Entry Endpoint.

Host

Defaults to localhost. Enter the Fully Qualified Domain Name (FQDN) or IP address of the server on your host machine that will connect to the external FTP server.

Port

The port that connects to the local (host) server. (i.e., 21)

Path

Specify a path that facilitates connection to the local server so that you don’t have to provide a username and password.

User

The username for authentication on the host server.

Password

The password for authentication on the host server.

Transfer Mode

Select either the Binary or ASCII radio button to specify a file transport encoding. Binary is the default.

Use Passive Mode

If the client is behind a firewall, check this box to enable the passive protocol. Passive mode is active by default.

Polling Frequency

(Applies to inbound FTP endpoints only). For an inbound FTP endpoint, this field specifies how often to check the external FTP server for new (incoming) data. The default value is 1000 ms.

FTP Output

(Applies to outbound FTP endpoints only). In the text box labelled Pattern, enter the pattern the endpoint should use when writing files to disk. Select the pattern from the list of file-name parser patterns, which you configure in the connector associated with this endpoint.

Advanced Tab

FTPadvanced

Property Description

Address

Enter the address for this endpoint, i.e. ftp://user:password@localhost:21/path.

Response Timeout

Specify how long the endpoint must wait for a response (in ms).

Encoding

Choose from a drop-down list the character set used for message data. (i.e. UTF-8).

Disable Transport Transformer

Check this box if you do not want to use the endpoint’s default response transport.

MIME Type

Select from the dropdown list one of the formats this endpoint supports.

Output Pattern

(Applies to outbound FTP endpoint only). Specify a pattern for naming files that get sent from the File endpoint to the connected file system. If this is not set, the File endpoint uses the same file-naming pattern used for incoming files.

References Tab

FTPreferences

Field Description

Connector Reference

Click anywhere in the text box labelled Connector Reference to display the dropdown list and select a previously configured global connector template to associate with this particular endpoint instance. Alternatively, click the “pencil” icon to modify one of these previously created global connectors.

If you have not yet created any global connector for FTP endpoints, you can do so now by clicking the green “plus” icon (+), then completing the fields on the various tabs of the FTP Global Connector Properties pane.

Endpoint Reference

Use the drop-down list to select one of the previously configured global endpoint templates, if any exist. Alternatively, click the “pencil” icon to modify one of these previously created global endpoints.

If you have not created any global endpoint for this type of endpoint, you can so by clicking the green “plus” icon (+), then completing the fields on the pane that appears.

Request Transformer References

Enter a list of synchronous transformers that will be applied to the request before it is sent to the FTP transport.

Response Transformer References

Enter a list of synchronous transformers that will be applied to the response before it is dispatched from the FTP transport.

Documentation Tab

The Documentation tab lets you add optional descriptive documentation for an endpoint. Every endpoint component has a Documentation tab and optional Description field.

FTPdocumentation

Field Description

Documentation

Enter a detailed description of this FTP endpoint for display in a yellow help balloon that pops up when you hover your mouse over the endpoint icon.

Reference

See the FTP Transport Reference for details on setting the properties for an FTP endpoint using an XML editor.