HTTP Client Begin Session Service
The HTTP Client Begin Session service starts an HTTP session with an external trading partner for exchanging business documents. This service works through an instance of the HTTP Client adapter.
The following table provides an overview of the HTTP Client Begin Session service:
System name | HTTP Client Begin Session Service |
---|---|
Graphical Process Modeler (GPM) categories | All Services, B2B Protocols > HTTP Client |
Description | The HTTP Client Begin Session service is used to start an HTTP session with an external trading partner for the purpose of exchanging business documents. This service works through an instance of the HTTP Client adapter. |
Business usage | Use this service to establish a session with a trading partner HTTP server. |
Usage examples | A 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 identified in the trading partner profile. The trading partner profile specifies HTTP as the transport protocol. Sterling B2B Integrator then uses the HTTP Client Begin Session service to establish a session with the trading partner's HTTP server. |
Preconfigured? | No |
Requires third-party files? | No |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | Related services:
|
Application requirements | An HTTP Server at the external trading partner location. |
Initiates business processes? | No |
Invocation | This service is invoked from a business process. |
Business process context considerations | The HTTP Client Begin Session service allows you to specify a remote password. In order for this password to be obscured in process data for the business process, you should also use the Obscure Data - Process Data Values service within the same business process. The Obscure Data - Process Data Values service may be used to mask the values associated with parameters. |
Returned status values | Returned status values:
|
Restrictions | N/A |
Persistence level | System Default |
Testing considerations | To test this service, run the HTTPClientDemoAllServices business process and verify that it completes successfully. For more information about the HTTPClientDemoAllServices business process, see the HTTP Client adapter. Debug information for this service can be found in the HTTP Client adapter and services log files. |
Implementing the HTTP Client Begin Session Service
- Create an HTTP Client Begin Session service configuration. For information, see Managing Services and Adapters.
- Configure the HTTP Client Begin Session service. For information, see Configuring the HTTP Client Begin Session Service.
- Use the HTTP Client Begin Session service in a business process.
Configuring the HTTP Client Begin Session Service
You can set the following values in the trading partner profile and specify it in the ProfileId field, or you can set these values in an instance of the service to only apply for that instance. If specified in the HTTP Client Begin Session service, the following values override those in the HTTP trading partner profile:
- CACertificateId
- CipherStrength
- ConnectionRetries
- RemoteHost
- RemotePasswd
- RemotePort
- RemoteUserId
- SSL
- SystemCertificateId
- RetryDelay
To configure the HTTP Client Begin Session service, you must specify settings for the following fields in the GPM:
Field | Description |
---|---|
Name | Name this service will have in Sterling B2B Integrator |
Description | Description of service |
Select a Group | Select one of the options:
Note: For more information about groups, see Managing Services
and Adapters.
|
Config | Name of the service configuration. |
CACertificateId | Select from the list of trusted Certificate Authority public certificates. In process data, this parameter is displayed as an object ID. Required if SSL is set to Must. Check an SSL certificate into the application to make it available in this list. |
CipherStrength | The level of encryption to apply to the data that
flows through the socket connection. Optional. Valid values are:
|
ConnectionRetries | The number of times the service will try to connect
to the Trading Partner Systems. Connection retries occur only with
TCP/IP related issues. Optional. Valid value is any numeric value. Note: The
value entered for this parameter overrides the Number of
connection retries setting in the HTTP Client adapter
configuration.
|
DelayWaitingOnIO | The amount of time (in seconds) that a business
process using the Http Client Begin Service adapter waits before going
to WAITING_ON_IO state and frees up the engine resources for other
processes. Optional. Valid value is an integer. If you specify a positive
integer, the parameter specifies the number of seconds the business
process has to wait for a response from the HTTP server before going
to WAITING_ON_IO state. If you specify a negative integer, the business
process waits for the response from the HTTP server to complete. The
business process does not go to WAITING_ON_IO state. If you specify
0, the business process goes to WAITING_ON_IO state after sending
a request to the HTTP server. If you specify a value lesser than -1,
the parameter value is set to 0 (default value). Note: The value you
specify in the httpclient.properties file for the defaultDelayWaitingOnIO
property overrides the setting you specified in the GPM.
|
HTTPClientAdapter | Select the HTTP Client adapter for this service to use when beginning a session with an HTTP server. Required. |
ProfileId | Trading partner profile identification. Optional. Valid value is any valid profile ID. |
RemoteHost | External Trading Partner host system (HTTP server IP Address or DNS name. Required. Use any valid IP Address or DNS name. |
RemotePasswd | HTTP remote login password. Optional. Note: For
the password to be masked in process data, the Obscure Data - Process
Data Values service must also be used in the same business process.
The name used to store the password must be the same as the specified
RemoteUserId.
|
RemotePort | External Trading Partner port number. Required. |
RemoteUserId | HTTP remote login username. Optional. |
RetryDelay | Number of seconds the adapter will wait before
retrying. Optional. Valid value is any numeric value. Note: The value
entered for this parameter overrides the Delay between
retries setting in the HTTP Client adapter configuration.
|
SSL | Determines SSL socket negotiation. Optional. Valid
values are:
|
SystemCertificateId | Select from the list of PrivateKeys/Public Certificates that are signed by the trading partner Trusted Certificate Authority. This certificate confirms the identity of the client to the server. Required if SSL is set to Must and the server requires client authentication. Obtain the certificate from your trading partner. Check it into Sterling B2B Integrator from the Admin menu selecting Trading Partner > Digital Certificates > System to make it available in this list. |
Output from Service to Business Process
The following table contains the parameters passed from the HTTP Client Begin Session service to the business process:
Parameter | Description |
---|---|
SessionToken | Specifies the identifier for the session established between the HTTP Client adapter and an HTTP server. Required. |
Output from Business Process to Service
The following table contains the parameters passed from the business process to the HTTP Client Begin Session service:
Field | Description |
---|---|
CACertificateId | Drop-down menu that contains a list of trusted Certificate Authority public certificates. In process data, this parameter is displayed as an object ID. Required if SSL is set to Must. |
CipherStrength | The level of encryption to apply to the data that
flows through the socket connection. Valid values are:
|
HTTPClientAdapter | Select the HTTP Client adapter for this service to use when beginning sessions with an HTTP server. Required. |
ConnectionRetries | The number of times the service will try to connect to the Trading Partner Systems. Connection retries occur only with TCP/IP related issues. Optional. Valid value: any numeric value. Default is 1. |
ProfileId | Trading partner profile identification. Optional. Valid value is any valid profile ID. |
RemoteHost | External Trading Partner host system (HTTP server IP Address or DNS name. Required. Use any valid IP Address or DNS name. |
RemotePasswd | HTTP remote login password. Optional. Note: The
password will be obscured using the Obscure service.
|
RemotePort | External Trading Partner port number. Required. |
RemoteUserId | HTTP remote login username. Optional. |
RetryDelay | Number of seconds the adapter will wait before retrying. Optional. Valid value is any numeric value. Default is 1. |
SessionBeginTime | Specifies the date and time that the session started. Required. |
SSL | The SSL flag that determines SSL socket negotiation.
Valid values are:
|
SystemCertificateId | Select from the list of PrivateKeys/Public Certificates that are signed by the trading partner Trusted Certificate Authority. Valid value is any alphanumeric string. |
UsingRevealedPasswd | Indicates whether the password sent to the service is unobscured. Valid value is True or False. Default is False. Optional. |
ResetConnectionOnError | HTTP Respond service completes successfully even though HTTP Client times out.
Also, set ErrorOutAfterConnectionClose on HTTP Respond Service .
The valid values are enable or disable . |
Business Process Example
The following example business process illustrates by using the HTTP Client Begin Session service:
<process name="HTTPExample">
<sequence>
<operation name="Obscure Password">
<!-- insert obscured password into process data -->
<participant name="HTTPClientObscureParameter"/>
<output message="outmsg">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="HTTPClientObscureResults" from="*"></assign>
</input>
</operation>
<operation name="HTTP Client Begin Session Service">
<participant name="HTTPClientBeginSession"/>
<output message="HTTPClientBeginSessionServiceTypeInputMessage">
<assign to="HTTPClientAdapter">HTTPClientAdapter</assign>
<assign to="RemoteHost">hostb</assign>
<assign to="RemotePort">26633</assign>
<assign to="RemoteUserId">admin</assign>
<!-- copy obscured password from process data to service -->
<assign to="RemotePasswd" from="admin/text()"></assign>
<assign to="SSL">Must</assign>
<assign to="CipherStrength">Strong</assign>
<assign to="CACertificateId">B2BHttp-Id</assign>
<assign to="SystemCertificateId">httptestclientcert1-Id</assign> -->
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="HTTPClientBeginSessionServiceResults" from="*"></assign>
</input>
</operation>
The following example shows how to use of the revealObscured function when the user ID contains domain or special characters. First, create a name in the Obscure Service without any special characters and assign the appropriate password to it. In the following example, the name created in the Obscure Service is "htan" while the userid is sgp-htan\htan.
The parameter to the revealObscured() function is the node containing the obscured password. The function uses the node name as the key and the node value as the obscured password when unobscuring.
<operation name="Obscure HTTP client password">
<participant name="HTTPClientObscureParameter"/>
<output message="outmsg">
<assign to="." from="*"/>
</output>
<input message="inmsg">
<assign to="ObscureResult" from="*"/>
</input>
</operation>
<operation name=" HTTP Client Begin Session Service ">
<participant name="HTTPClientBeginSession"/>
<output message="BeginSessionRequest">
............
<assign to="RemoteUserId">sgp-htan\htan</assign>
<assign to="UsingRevealedPasswd">true</assign>
<assign to="RemotePasswd" from="revealObscured(ObscureResult/htan)"/>
..........
</output>
<input message="inmsg">
<assign to=" HTTPClientBeginSessionServiceResults " from="*"/>
</input>
</operation>