HTTP Respond Service
The HTTP Respond service sends responses to trading partners who submitted an HTTP request.
The following table provides an overview of the HTTP Respond service:
System name | HTTP Respond Service |
---|---|
Graphical Process Modeler (GPM) category | None |
Description | This adapter sends responses to trading partners
who have submitted an HTTP request. The request could have been submitted
through the B2B HTTP Server adapter or through the new, Perimeter
server-based HTTP Server adapter. Note: Because of our continuing efforts
to improve services and adapters to align with new technology and
capabilities, the B2B HTTP Server adapter has entered the retirement
process in Sterling B2B Integrator and
will be replaced with the HTTP Server adapter. For more information
on the retirement process, see Retiring and Removed Services and
Adapters.
|
Business usage | A business user would use this adapter to return a response to a trading partner over the HTTP transport protocol, when the trading partner initiates the HTTP connection. |
Usage example | A trading partner submits a document to a URL in Sterling B2B Integrator. The URL is configured to initiate a specific business process. The business process completes activities and returns a response to the trading partner to confirm that the request was processed. This response is returned using this service. |
Preconfigured? | Yes |
Requires third party files? | When used with the HTTP Server adapter, Jetty's two .jar files must be available; Jetty is an open source, embeddable webserver and servlet engine. |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | HTTP Server adapter |
Application requirements | Unless the Perimeter server local-mode is used, the external Perimeter server must be running. |
Initiates business processes? | No |
Invocation | Runs as part of a business process. |
Business process context considerations | No |
Returned status values | Returned status values:
|
Restrictions | None |
Persistence level | None |
Testing considerations | Debug information related to this adapter can be found in http.log. The level of logging can be controlled through the Sterling B2B Integrator UI or the log.properties file. |
How the HTTP Respond Service Works
- A trading partner sends data to your company using HTTP.
- Your HTTP Server adapter receives the data, initiates a business process, and writes the transport-instance-id and transport-session-id for the HTTP connection into process data.
- The business process runs and after specified tasks are completed, invokes the HTTP Respond service.
- The business process passes the transport-instance-id and transport-session-id from the original HTTP connection to the service.
- The service uses these IDs to find the original HTTP connection, which is still open, and uses it to send a reply to your trading partner.
Implementing the HTTP Respond Service
A configuration of the HTTP Respond service (HttpRespond) is provided with Sterling B2B Integrator. Because it has no configuration parameters, it should not be necessary to create any new configurations of the HTTP Respond service. The configuration provided should suffice for all uses of this service, including using the service in a business process.
Output from Business Process to Service
The following table describes the output from the business process to the HTTP Respond service:
Parameter | Description |
---|---|
transport-instance-id | Identifies the specific instance of the adapter
on which the request was received. This might be a B2B HTTP Server
adapter or a Perimeter server-based HTTP Server adapter. Valid value
is a non-empty string generated by an HTTP server adapter. Required. Note: Because
of our continuing efforts to improve services and adapters to align
with new technology and capabilities, the B2B HTTP Server adapter
has entered the retirement process in Sterling B2B Integrator and will
be replaced with the HTTP Server adapter. For more information on
the retirement process, see Retiring and Removed Services and Adapters.
|
transport-session-id | Transport Session ID. Identifies the specific inbound connection on the HTTP Server adapter on which the request was received and to which the response must be returned. In either case, the adapter is identified by the transport instance ID. Valid value is a non-empty string that should not be fabricated. Each value is created by an HTTP Server adapter instance for an inbound HTTP session. Required. |
doc-has-headers | Raw mode selection for the response. Valid values are True and False. If True, when the service runs, the primary document is expected to have the HTTP headers for the response; that is, the primary document has a MIME, RFC822 or HTTP structure with headers and body. If False, the primary document does not contain any headers. Required. |
status-code | The HTTP status code for the response message to the HTTP client. Each range has a specific meaning. For example, codes between 200 and 299 are success codes and those between 400 and 599 specify different kinds of failures. Valid values are between 100 and 599. Default is 200. Optional. |
xport-doc-on-error |
The HTTP Respond service returns a document, even in a failure scenario, if the property xport-doc-on-error is set to true, else the HTTP Respond service does not return a document in response to failure scenarios. Valid values: true or false. |
ErrorOutAfterConnectionClose | HTTP Respond service completes successfully even though HTTP Client times out.
Also, set ResetConnectionOnError on
HTTPClientBeginSessionService .The valid values are enable or disable . |
Business Process Example
The following example business process returns an HTTP response with the contents of the primary document being the HTTP body (non-raw mode):
<process name="NonRawHttpRespond">
<sequence>
<operation>
<participant name="HttpRespond"/>
<output message="noopout">
<assign to="doc-has-headers">false</assign>
<assign to="." from="*"/>
</output>
<input message="noopin">
<assign to="." from="*"/>
</input>
</operation>
</sequence>
</process>