/n software Connectors for MuleSoft

Questions / Feedback?

FTP Connector

Properties   Configuration Settings  

The FTP Connector adds SSL-enabled FTP send and receive capabilities to your MuleSoft.

Remarks

The FTP Connector adds a complete FTP client to your Mule Project and enables it with plaintext or SSL-secured file download and upload capability.

FTP Receive Connector

The FTP Receive Connector will establish a connection to a server and download a group of files. A single property must be set: FTPServer. You may also set an FTPPort if the server is not set to the default protocol port. If your FTP server requires authentication, you should set the User, Password and/or Account properties. If you wish to enable SSL, you can turn it on by setting an appropriate SSLCert and SSLStartMode as well as supplying an SSLAcceptServerCert.

The connector will connect to the FTP server every PollingInterval and list the directory specified by RemotePath. All files that match the FileMask will be downloaded and submitted to the Mule Project as individual Mule Messages. In order to guarantee that files are not downloaded multiple times, you may set the DeleteMode. If you wish to do any other PRE- or POST-GET operation, you can specify them as scripts through the BeforeGet and AfterGet properties, respectively.

Download Example

Drag and drop the FTP Receive Connector into the source position of a flow. All that is necessary to get started is to configure the connection settings.

Just as an example, say you want to download a group of files stored on a remote machine in /home/Bob/files. To configure the connector, one option is to specify a RemotePath of /home/Bob/files and an empty FileMask. Since FileMask defaults to *.*, all files in the RemotePath will be downloaded.

The connector will generate one mule event for each file in the remote location. Use a File Write connector behind the FTP Receive connector to write the files to disk.

The received filename is available in the ReceivedFileName attribute on each Mule Message. To write the entire group of files to disk, you can set the Path property of the File Write connector to the following DataWeave code:


"C:\\my\\files\\" ++ attributes.ReceivedFileName

The Content can be left as payload. That is all that is required to begin downloading files.

FTP Send Connector

The FTP Send Connector will establish a connection to a server and upload a file. Two properties must be set: FTPServer and a RemoteFile. If your server does not operate on the default FTP port, you will need to specify the correct port via FTPPort. For servers that do not allow anonymous uploads, you may also need to set User, Password, and/or Account. To enable SSL, you should select a client SSLCert and a SSLAcceptServerCert as well as an SSLStartMode.

The connector will connect to the FTP server whenever it has a message to send. The connector will attempt to upload to the specified RemotePath. In order to prevent parallel processing by another application before your upload is complete, you may need to set a temporary extension via TemporaryUploadExtension. If Overwrite is set to True, the connector will delete or overwrite remote files as necessary to complete the operation.

If you wish to do any other PRE- or POST-PUT operation, you can specify them as scripts through the BeforePut and AfterPut properties, respectively.

Upload Single Example

To get started, add a File Read connector in front of the FTP Send connector and configure it to read a particular target file. The bytes in the payload of the incoming Mule Message are uploaded as a single file.

There is no need to transform the output of the File Read connector before passing it to the FTP Send connector. Configure the FTP Send connector with the above connection settings. That is all that is required to upload the file.

Upload Multiple Example

The Send operation only uploads a single file at a time so we will need to perform the Send operation once for each file.

To get started, add a File List connector to your flow and configure it to list a target folder. The output payload of File List is an Array of file content and a set of attributes for each file.

Behind the File List connector add a For Each Scope and configure it to iterate over the message payload. Inside the For Each Scope, add a FTP Send operation and configure it with the above connection settings.

Set the RemoteFile property dynamically with DataWeave to preserve the uploaded filename. To do this, click the Mule Expression indicator on the RemoteFile property and add the following DataWeave code:


"/home/Spencer/files" ++ attributes.fileName

That is all that is required to upload a group of files.

Receiver Property List


The following is the full list of the properties of the receiver connector with short descriptions. Click on the links for further details.

AfterConnectA set of FTP commands to be executed immediately after connecting to the FTPServer .
AfterGetA set of FTP commands to be executed after the GET.
BeforeGetA set of FTP commands to be executed before the GET.
DeleteModeControls if and when the remote file is deleted after download.
FileMaskIndicates the type of files to download from the FTP server.
FirewallA set of properties related to firewall access.
FTPPortThe port for the FTP service (default is 21).
FTPServerThe domain name or IP address of the FTP server.
LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during connector execution.
LogTypeHow information gets logged during connector execution.
OtherDefines a set of configuration settings to be used by the connector.
PassiveControls whether to direct the server into passive mode. Recommended if behind a firewall.
PasswordThe password for login.
PersistentConnectionInstructs the connector whether to keep the connection to the server open.
ReceivedFileDateThe date of the remote file received by the FTP connector.
ReceivedFileNameThe name of the remote file received by the FTP connector.
ReceivedFilePathThe remote path of the file received by the FTP connector.
ReceivedFileSizeThe size of the remote file received by the FTP connector.
ReceivedFileUserThe user name used by the FTP connector when downloading the remote file.
RemotePathThe current path in the FTP server.
RuntimeLicenseSpecifies the connector runtime license key.
SSLAcceptServerCertInstructs the connector to unconditionally accept the server certificate that matches the supplied certificate.
SSLCertThe certificate to use for client authentication during the SSL handshake.
SSLStartModeDetermines how the connector starts the SSL negotiation.
TempPathA temporary local directory where data can be stored before the connector processes it.
TimeoutA timeout for the connector.
TransferModeThe transfer mode (ASCII or Binary). If the value is 0 (default), the initial server mode will be used.
UserThe user id for login.
UseSimpleDirListInstructs the connector to issue the NLST command instead of LIST.

Sender Property List


The following is the full list of the properties of the sender connector with short descriptions. Click on the links for further details.

AfterConnectA set of FTP commands to be executed immediately after connecting to the FTPServer .
AfterPutA set of FTP commands to be executed after the PUT.
AppendWhether or not the connector should append data to the RemoteFile .
BeforePutA set of FTP commands to be executed before the PUT.
FirewallA set of properties related to firewall access.
FTPPortThe port for the FTP service (default is 21).
FTPServerThe domain name or IP address of the FTP server.
LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during connector execution.
LogTypeHow information gets logged during connector execution.
OtherDefines a set of configuration settings to be used by the connector.
OverwriteWhether or not the connector should overwrite files during transfer.
PassiveControls whether to direct the server into passive mode. Recommended if behind a firewall.
PasswordThe password for login.
PersistentConnectionInstructs the connector whether to keep the connection to the server open.
ReceivedFileDateThe date of the remote file received by the FTP connector.
ReceivedFileNameThe name of the remote file received by the FTP connector.
ReceivedFileSizeThe size of the remote file received by the FTP connector.
ReceivedFileUserThe user name used by the FTP connector when downloading the remote file.
RemoteFileThe name of the destination file on the FTP server for uploading.
RemotePathThe current path in the FTP server.
RemoteTempPathA temporary directory on the server to store files before moving them to RemotePath .
RuntimeLicenseSpecifies the connector runtime license key.
SSLAcceptServerCertInstructs the connector to unconditionally accept the server certificate that matches the supplied certificate.
SSLCertThe certificate to use for client authentication during the SSL handshake.
SSLStartModeDetermines how the connector starts the SSL negotiation.
TimeoutA timeout for the connector.
TransferModeThe transfer mode (ASCII or Binary). If the value is 0 (default), the initial server mode will be used.
UserThe user id for login.
UseSimpleDirListInstructs the connector to issue the NLST command instead of LIST.

Configuration Settings


The following is a list of configuration settings for the connector with short descriptions. Click on the links for further details.

AccountThe user account to login with.
AutoSelectDataIPAutomatically select the data connection IP.
CheckFileExistsWhether to check if the remote file exists before uploading.
DownloadCacheFileWhen set, only new files will be downloaded from the server.
DownloadCacheFileDurationThe number of minutes that a file name will remain in the download cache.
EnableFileDetailsComparisonWhether the receive connector should consider metadata differences when deciding whether to download a file again.
ExcludeMaskInstructs the connector to exclude some files when downloading.
MaxFilesPerPollingIntervalThe maximum number of files that will be downloaded from the server during a single poll.
ModeZCompressionLevelUsed to specify the level of compression used.
PortRangeAllows the specification of a port range the connector listens to.
ReusePISSLSessionInDIWhether the PI SSL session will be reused for the DI connection.
ReuseSSLSessionInDIWhether the SSL session will be reused for the DI connection.
UseClearCommandChannelAllows for the Clear Command Channel (CCC) command.
UseClearDataChannelAllows for the PROT C command.
UseEPSVAllows extended passive mode.
UseFSwitchSpecifies whether or not the -F parameter is used when listing directory contents.
UseMLSDUses listings for machine processing.
UseModeZAllows compression to be used when transferring data.
UseProtWhenImplicitSends PROT P to the server.
UseRemoteHostAddressForPassiveInstructs the connector to use the FTPServer in passive mode.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLSecurityFlagsFlags that control certificate verification.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
TLSNamedGroupsThe supported (EC)DHE groups.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
TcpNoDelayWhether or not to delay when sending packets.
UseInternalSecurityAPITells the connector whether or not to use the system security libraries or an internal implementation.

 
 
Copyright (c) 2021 /n software inc. - All rights reserved.
/n software Connectors for MuleSoft - Version 20.0 [Build 7722]