salesforce egress connector

Salesforce Egress Connector

Version: 17.07

Supported Since: 17.07

What is Salesforce Egress Connector?

This is an extended version of the HTTPS NIO Egress Connector. In addition to the features provided by the HTTPS NIO Egress Connector, the Salesforce Egress Connector is used to attach the access token for each request directed to Salesforce through the UltraESB-X.

In order to use the SalesForce Egress Connector, you must first select the SalesForce Connector dependency from the connector list when you are creating an empty Ultra project. If you have already created a project, you can add the SalesForce Connector dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Connectors list, select the SalesForce Connector dependency.
salesforce egress connector 4

Out Ports

On Exception

The message will be emitted from this out port if the processing element failed to send the message to Salesforce endpoint

Response Processor

The response message received from Salesforce will be directed to this port. You can use this port to connect any precessing element or connector that is supposed to process/consume the response.

Side Ports

Connector Operation

This port is used to connect operational elements to the Egress Connector. By-default, user does not have to connect any operational element and the default connector operation will be used.

Parameters

* marked fields are mandatory

Salesforce Username *

Basic

Username for the API enabled Salesforce developer account.

Salesforce Password *

Basic

Password for the API enabled Salesforce developer account.

Client ID *

Basic

Client ID of the API enabled Salesforce developer account.

Client Secret *

Basic

Client Secret of the API enabled Salesforce developer account.

Security Token *

Basic

Security Token of the API enabled Salesforce developer account..

Access Token Expiration Time

Basic

Expiration time of the access token.

Destination Address Type

Basic

Select the type of the destination address. URL type will deliver the message into the specified absolute URL which is constructed using Destination Host, Destination port and Service Path. PREFIX type will deliver the message to the constructed URL from the prefix constructed using Destination Host, Destination port and Service Path, suffixed by the original requests path.

Suppose you want to forward all the requests coming to /front/.* service path of a NIO HTTP ingress connector to /back/.* endpoint.

Then at the HTTP ingress connector, specify /front/.* as the Service path. At HTTP egress connector specify PREFIX as the Destination Address Type and specify back for Service Path.

Now when a message is received by the ingress connector for /front/path/anotherpath/, then that will be forwarded to the /back/path/anotherpath/ resource path at the back end.

Destination Host *

Basic

The hostname of the endpoint to which this connector is supposed to send messages.

Destination Port

Basic

The port in the endpoint given by Destination Host to which this connector will be sending messages.

Service Path

Basic

The service path to which this connector will be sending the messages.

Egress Timeout

Advanced

Timeout value in milliseconds for the egress message. After this time amount has been elapsed, the message flow will end exceptionally without waiting for the response from the external system.

Identity Store Location

SSL Configuration

Path to the identity key store where the key-pair used for this egress connector’s identity is located.

Identity Store Password

SSL Configuration

Password of the identity key store located at Identity Store Location

Identity Key Password

SSL Configuration

Password used to protect the private key of the identity key-pair.

Trust Store Location

SSL Configuration

Path to the key store where this egress connector’s trusted certificates are located.

Trust Store Password

SSL Configuration

Password used to protect the trust store located at Trust Store Location

Hostname Verifier

SSL Configuration

Mechanism used for checking if a hostname matches the names stored inside the server’s X.509 certificate. Available mechanisms are,

  1. Default - The hostname must match either the first CN, or any of the subject-alts. A wildcard can occur in the CN, and in any of the subject-alts.

  2. AllowAll - Disables hostname verification

  3. Strict - works the same way as java.net.URL, IE6 etc. Compliant with 2818 for wildcards. The hostname must match either the first CN, or any of the subject-alts. A wildcard can occur in the CN, and in any of the subject-alts.

  4. DefaultAndLocalhost - Same as Default, but a host of "localhost", "localhost.localdomain", "127.0.0.1", "::1" will always pass, no matter what is in the server’s certificate+

Prevent Remote Certificate Verification

SSL Configuration

Indicates whether not validate remote endpoint certificates. This parameter should be turned to true only in non-production usages. Turning this parameter on will cause no remote endpoint certificate to be validated. Therefore always be careful when turning on this parameter.

SSL Protocol Version

SSL Configuration

Specify which protocol version to be used for HTTPS connections. This parameter defaults to TLS. Available values are,

  1. TLS

  2. TLSv1

  3. TLSv1.1

  4. TLSv1.2

You can chose the TLS version depending on the level of security your ingress connector is expected to have when transporting data.

Supported TLS Versions

SSL Configuration

The set of TLS versions to be enabled for this Ingress Connector given here as a comma separated string.

Supported Cipher Suits

SSL Configuration

The set of cipher suites to be enabled should be given here as a comma separated string. This is an advanced SSL configuration where only the specified set of cipher suits will be used to encrypt connections between the ingress connector and the clients.

Proxy Host

Sender Configuration

The proxy server hostname, if there is a proxy server to go through

Proxy port

Sender Configuration

The proxy server port, if there is a proxy server to go through. (Should be a valid integer between 0 and 65535)

Proxy Bypass list

Sender Configuration

The proxy bypass list, Requests sent to these hosts will not be subjected to proxing. This list can be specified as a custom Spring bean in project.xpml

Keep-Alive timeout

Sender Configuration

The default keep alive time for re-usable outgoing connections in connection pool, in milli-seconds. Defaults to 30 seconds.

Keep-Alive safety threshold

Sender Configuration

The safety threshold to leave at the end of the keep-alive duration, where a connection is not re-used in the connection pool. (In milli-seconds). Defaults to 5 seconds.

Max connections per route

Sender Configuration

The maximum connections per route (i.e. scheme http/s, host and port pair). Defaults to 2048

Max connections

Sender Configuration

The total maximum connections to be opened at any time. Defaults to 4096

Continue on runtime exceptions

Sender Configuration

Whether the engine should continue execution on the occurrence of a runtime exception. If set to false, engine will shutdown and restart on such a situation

Continue on checked exceptions

Sender Configuration

Whether the engine should continue execution on the occurrence of a checked exception. If set to false, engine will shutdown and restart on such a situation

Tuning parameters

Sender Configuration

HTTP level tuning parameters as a map.

http.socket.timeout

TCP level socket timeout

http.connection.timeout

Time limit to establish a TCP level connection

http.tcp.nodelay

Use of nagle algorithm ? - default true

http.jvm.interest-ops-queued

Should NIO interest ops be queued? false for Sun/Oracle JDKs, true for IBM JDK

http.socket.buffer-size

Socket buffer size - default 8K

| Zero copy enabled | Transport Configuration | Whether to enable zero copying or not. Read more about Zero-Copy

| Connection debug | Transport Configuration | Whether to enable connection debug or not. Connection debug gives you a log if something went wrong in connection level

| Connection debug headers | Transport Configuration | A comma separated list of HTTP headers to be dumped on a connection failure, when connection debugging is enabled. Specify as 'all' to dump all headers or as 'none' to prevent dumping of headers.

| Replace User-Agent | Transport Configuration | If selected user agent header will be replaced by ESB’s server name

| Unzip Response Entities | Transport Configuration | Select for unzip compressed responses. Where compressed responses are not required for processing, it may be better to leave them intact for extreme direct proxying cases

Message Properties

key Description

x.internal.last_absolute_url

The value of the actual absolute URL sent to

x.http.message_size

The size of the received message over HTTP.

Note: This is only available for requests and responses received - and not for messages about to be sent out

x.http.header_size

The size of the received message header over HTTP.

Note: This is only available for requests and responses received - and not for messages about to be sent out

x.http.entity_size

The size of the received message payload over HTTP.

NOTE: This is only available for requests and responses received - and not for messages about to be sent out

x.http.response_status_code

Holds the HTTP response status code of received response

x.http.response_time

Holds the time between last read time and last write time (response time) in milli-seconds

ERROR codes

Code

Description

101500

The error code indicating an IOException while sending

101501

The error code indicating an IOException while receiving

101503

The error code indicating a failed connection attempt

101504

The error code indicating a connection [socket] timeout waiting for a response from the remote party

101505

The error code indicating a connection close by the remote party while receiving

101506

The error code indicating a HTTP protocol violation

101507

The error code indicating a connection attempt request being cancelled

101508

Error code indicating a connection attempt timeout occurred

Note : Can be configured using property "http.connection.timeout" on the Http/s NIO Egress connector

101512

The error code indicating a connection [socket] timeout submitting the request to a remote party

101513

The error code indicating a connection close by the remote party while sending

Sample Use Case

In order to run this sample, you will need a API access enabled salesforce developer account.
Sending a request to Salesforce

In this sample we’ll use the NIO HTTP Ingress Connector to obtain request and then forward those to Salesforce Egress Connector.

Search for "Salesforce Egress Connector" and drag and drop in the editor. Set the Destination Address type to URL and edit the configurations so that Destination Host is instance_name.salesforce.com, Service Path is /services/data/v20.0/sobjects/Account/ as shown below.

Egress Config
Figure 1: Egress Config

Next complete the flow by connecting processing elements, refer to figure 3.

Complete flow
Figure 2: Complete flow

Now create a run configuration if one not already configured and then run the project. Take a look at the logs printed out on the IDEA Run Tool window, you will be able to see that the UltraESB server is started and listening on the port 8280

It’s the time to send a HTTPS Request and test our flow. Open the HTTP/S client Tool Window and set a sample request payload in the text box located in the left. After setting the URL text field as well you can send the message out.

In this topic
In this topic
Contact Us