FTP Client Adapter
The FTP Client adapter uses the FTP Client services to send FTP requests to trading partners by using a perimeter server. It replaces the B2B FTP Client adapter, the FTP Send adapter, and the FTP GET adapter.
The following table provides an overview of the FTP Client adapter:
System name | FTP Client Adapter |
Graphical Process Modeler (GPM) category | Not available in the GPM |
Description | This adapter is used with the FTP Client services to send FTP requests to trading
partners by using a Perimeter server. The FTP Client adapter replaces the B2B FTP Client adapter,
the FTP Send adapter, and the FTP GET adapter, which is being retired. The FTP Client adapter and
its related services provide all the functionality of the former three adapters plus the following enhancements:
|
Business usage | Use this adapter to send FTP requests to perform activities such as to get or put files into a directory on the trading partner's FTP server. |
Usage example | A Sterling B2B Integrator business process is executed that translates a document that must be sent to a trading partner. After the translation, Sterling B2B Integrator looks up information about how to transport data to the trading partner in the trading profile. The trading profile specifies FTP as the transport protocol. Sterling B2B Integrator then uses the FTP Client adapter to send the document to the trading partner. |
Preconfigured? | No |
Requires third-party files? | No |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | Related services:
|
Application requirements | An FTP server at the external trading partner location.
When this adapter is configured with a ‘non-local-mode'
Perimeter server, the Perimeter server must be installed and running. Note: You
should use a specific external interface for communications with trading
partners. Using a wildcard address can cause problems with FTP sessions.
If some other process has bound the port used for the data channel
on an interface, it may receive connections intended for the data
channel. Using a specific TCP/IP address or DNS name prevents this
from occurring.
|
Initiates business processes? | This adapter does not initiate business processes. |
Invocation | This adapter is invoked from one of the FTP Client services used within a business process. |
Business process context considerations | Business processes using FTP client services should not be marked as Auto Resume. These services require an established session which will no longer exist after a restart. |
Returned status values | Returned status values:
|
Restrictions | None |
Persistence level | None |
Testing considerations | Test this adapter by running the FTPClientDemoAllServices business process
provided with Sterling B2B Integrator. This
business process tests the FTP Client adapter and all its related services. The
FTPClientDemoAllServices business process uses the preconfigured instance of the FTP Server adapter,
which is disabled by default, and must be enabled before running this test. To verify that the
preconfigured FTP Server adapter is enabled, perform the following steps from the Sterling B2B Integrator Admin Console: 1. Choose Business Processes > Deployment > Services > Configuration. 2. Find FTP Server Adapter. 3. If not already selected, select the Enabled check box. To test the FTP Client adapter, perform the following steps from the Sterling B2B Integrator Admin Console: 1. Choose Business Processes > Manager. 2. Find the FTPClientDemoAllServices business process. 3. Run the FTPClientDemoAllServices business
process with the following settings:
|
Notes | Every FTP Client service returns a response code
from the server. If this code is an error code as defined by the FTP
specification (that is, 4xx or 5xx) then the business process will
produce a fault. If the error code is expected, use an OnFault service
to continue interacting with the trading partner. There are two exceptions
to this rule:
|
Business Scenario
You want to send a file to a trading partner, using FTP. The file must be placed in a specific directory on the trading partner's FTP server. After putting the file in the directory, you want to list the contents of the directory to verify that it was copied correctly.
Business Solution Example
- Create an FTP Client adapter configuration to be used by the FTP client services that will be included in a business process to send the file.
- Create a business process that:
- Opens an FTP communications session with the trading partner (using the FTP Client Begin Session service)
- Changes to the correct directory on the trading partner's FTP server (using the FTP Client CD service)
- Puts the file in the directory (using the FTP Client PUT service)
- Generates a list of the directory contents to verify that the put command was successful (using the FTP Client LIST service)
- Closes the FTP session (using the FTP Client End Session service)
This business solution is described for both the GPM and the BPML.
GPM Example
The following example shows a solution to the above business scenario using the GPM:
Business Process Modeling Language (BPML) Example
The following example shows the corresponding business process solution by using BPML:
<process name="default">
<sequence>
<operation name="FTP Client Begin Session Service">
<participant name="FTPClientBeginSession"/>
<output message="FTPClientBeginSessionServiceTypeInputMessage">
<assign to="CipherStrength">STRONG</assign>
<assign to="ClearControlChannel">NO</assign>
<assign to="ConnectionRetries">2</assign>
<assign to="FTPClientAdapter">FTPClientAdapter</assign>
<assign to="ProfileId">tradingpartner1</assign>
<assign to="RemoteHost">000.00.000.00</assign>
<assign to="RemotePasswd">uuuuuuuu</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="FTP Client CD Service">
<participant name="FTPClientCd"/>
<output message="FTPClientCdServiceTypeInputMessage">
<assign to="CdUp">YES</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="FTP Client LIST Service">
<participant name="FTPClientList"/>
<output message="FTPClientListServiceTypeInputMessage">
<assign to="ConnectionType">ACTIVE</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="FTP Client PUT Service">
<participant name="FTPClientPut"/>
<output message="FTPClientPutServiceTypeInputMessage">
<assign to="DocumentId">doc12345</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="FTP Client End Session Service">
<participant name="FTPClientEndSession"/>
<output message="FTPClientEndSessionServiceTypeInputMessage">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</process>
Implementing the FTP Client adapter
- Create an FTP Client adapter configuration. For information, see Managing Services and Adapters.
- Configure the adapter. For information, see Configuring the FTP Client adapter.
Configuring the FTP Client adapter
To configure the FTP Client adapter, you must specify field settings in Sterling B2B Integrator.
Field | Description |
---|---|
Name | Unique and meaningful name for the adapter configuration. Required. |
Description | Meaningful description for the adapter configuration, for reference purposes. Required. |
Select a group | Group of services or adapters of the same type
that can act as peers. A Service Group name is used in BPML in place
of the Service Configuration name. Service Groups show up in the GPM
as if they were Service Configurations. Select a Service Group to
associate with this adapter. Valid values are:
|
Perimeter Server | Select the Perimeter server to use with this adapter.
Default is node1 & local. Required. Note: You should use a specific
external interface for communications with trading partners. Using
a wildcard address can cause problems with FTP sessions. If some other
process has bound the port used for the data channel on an interface,
it may receive connections intended for the data channel. Using a
specific TCP/IP address or DNS name prevents this from occurring.
|
Minimum Number of Threads | A tuning parameter that indicates the range of threads available for handling events to improve performance. Must be less than or equal to Max Threads value. Valid value is any integer. Default is 3. Required. |
Maximum Number of Threads | A tuning parameter that indicates the range of threads available for handling events to improve performance. Must be greater than or equal to Min Threads value. Valid value is any integer. Default is 6. Required. |
NAT Address Specification (V5.2.6.2_1 or later) | For use with NAT (Network Address Translating) routers and firewalls in ACTIVE
mode. This is the IP address where you want the NAT to forward all incoming requests. Default value
is blank. The NAT address can also be specified at the global level by updating the property file psftpclient.properties.in to include the value afterNATAddress = x.x.x.x. If this is not configured, the local address is used. |
Local Control Port Range | Any valid port numbers not being used by another application running on the system. A port in the specified range will be used to establish a control channel to the remote FTP server. Optional. |
Local Data Port Range | Any valid port numbers that are not being used by another application running on the system. Contact your network administrator if the port numbers are restricted in any way. A port in the specified range will be used to establish a data connection to the remote FTP server. Optional. |
Use SOCKS5 Proxy Server | Whether to use a SOCKS5 proxy server. Required. Valid values:
|
Proxy hostname | IP address or host name of the proxy server to use. Required if Use SOCKS5 proxy server is set to Yes. |
Proxy port | Port number of the proxy server. Required if Use SOCKS5 proxy server is set to Yes. |
Proxy retries | Number of times the FTP client adapter will try to connect to the proxy server. Valid values can be any integer between 0 and 50. Default is 3. |
Use proxy basic authentication | Whether the proxy server requires basic authentication. Valid values:
|
Proxy username | User name to use with the proxy server. Required if Use proxy basic authentication is set to Yes. |
Proxy password | Password for the Proxy username. Required if Use proxy basic authentication is set to Yes. |
Support for FTP Adapters in Active mode on a Certified Container platform
During file transfer using FTP protocol, in Active mode, the FTP client initiates the control connection with the FTP server and sends an IP address and a range of ports to which the server opens the data connection channel. While setting up the FTP adapters for a Certified Container deployment, you can provide the IP information to be passed by the FTP client.
You must set the property ps_ftpclient.afterNATAddress
with the external IP
address.
- Setting the property in
values.yaml
fileYou need to include the property
PROPERTY_ps\_ftpclient_afterNATAddress
in thesetupCfg
section.For example:
PROPERTY_ps\_ftpclient_afterNATAddress: x.x.x.x
whereps_ftpclient
is the prefix forpsftpclient.properties
file.Note: Any file prefix with an underscore must be escaped as shown in the above example. - Setting the property using Customizations UI
You need to update
ps_ftpclient.afterNATAddres
property with the value as the IP address.