HTTP Server Adapter
The HTTP Server adapter processes HTTP requests from trading partners by using a perimeter server.
The following table provides an overview of the HTTP Server adapter.
demosuite, federation,
portlets, webproduct, webservices, websuite, webxpord, webxtools, webx, wssd, xforms,
communitymanagement, onboard
.System name | HTTP Server Adapter |
---|---|
Graphical Process Modeler (GPM) category | None. Cannot be used as part of a business process. |
Description | Processes HTTP requests from trading partners by using a Perimeter server. The
HTTP Server adapter replaces the B2B HTTP Server adapter, which is being retired. The HTTP Server
adapter and its related services provide all of the functionality of that adapter, plus these benefits:
|
Business usage | Use this adapter to send documents to and receive documents from a trading partner using HTTP. |
Usage example | A trading partner submits a document to a URL in the application. The URL is configured to initiate a specific business process. The business process completes activities and returns a success response to the trading partner to confirm that the request was processed. If the URL is configured for a web application, the identified web application is started and delegated to. At that point, the flow is determined by the web application. |
Preconfigured? | The following instances of this adapter are installed with a stand-alone instance
of the application:
|
Requires third-party files? | Must obtain two .jar files from Jetty. Jetty is an open source, embeddable Web server and servlet engine. Two .jar files for Jasper (an open source JSP compilation library) and the. jar file for Ant (an open source build and compilation library) must be available for the handling of Web applications that contain JSPs. |
Platform availability | All supported application platforms. |
Related services | This adapter must be used in conjunction with the HTTP Respond service, which is the only way to return an HTTP response to a request waiting at a particular adapter instance. |
Application requirements | When this adapter is configured with a non-local-mode Perimeter server, the Perimeter server must be installed and running. This Perimeter server is typically installed in a DMZ environment, separated from the application by a firewall. |
Initiates business processes? | This adapter can find the name of a business process that is configured for a particular URL, initiate that business process and wait for the response. |
Invocation | Is not invoked by a business process. To return a response, use the HTTP Respond service. |
Business process context considerations | When a business process is initiated as a result of an HTTP request, the initial context process data contains the transport-instance-id and transport-session-id, information necessary for the HTTP Respond service to return the HTTP response. Process data also contains any query parameters in the URL. |
Returned status values | None |
Restrictions | WAR file deployment functionality is not available for WebSphere. |
Persistence level | None |
Testing considerations | Debug information related to this adapter can be found in
http.log . |
How the HTTP Server Adapter Works
The HTTP Server adapter receives data from a trading partner using HTTP. Using the HTTP Server adapter, you can initiate a business process or a Web application. If you are initiating a business process and want to send a reply or status to your trading partner about this data, you must have the business process invoke the HTTP Respond service, which sends the response to your trading partner.
Example
Your trading partner sends EDI purchase orders to your company, using HTTP and sending the data to a URI that you have specified.
You set up a configuration of the HTTP Server adapter that is associated with that URI. As part of creating this configuration, you specify whether the URI will be associated with a business process or a Web application, then select the specific business process or web application.
Your trading partner sends data to your URI, using an HTTP request. When the request is received and passed to the HTTP Server adapter, it invokes the business process or Web application that you specified when creating the adapter configuration. The adapter collects the transport-instance-id and transport-session-id from the initial request, and places the information into process data.
If the adapter initiates a business process, the HTTP request connection is put into a wait state while the business process completes. Once complete, the HTTP Respond service is called and uses the transport-instance-id and transport-session-id that were stored in process data to send a reply on the same connection that the request came in on.
If the adapter initiates a Web application, the Web application determines what to return and when.
Implementing the HTTP Server Adapter
- Create an HTTP Server adapter configuration. For information, see Managing Services and Adapters.
- Configure the HTTP Server adapter. For information, see Configuring the HTTP Server Adapter.
Configuring the HTTP Server Adapter
To configure the HTTP Server adapter, you must specify field settings in the application, as described in the following table.
Field | Description |
---|---|
Name | Unique and meaningful name for the adapter configuration. Required. |
Description | Meaningful description for the adapter configuration, for reference purposes. Required. |
Environment | Nodes where the HTTP Server Adapter is deployed. The values are - nodes in the
cluster, adapter containers, All ASI nodes, All ASI nodes plus all Adapter Container Nodes, and All
Adapter Container Nodes. To scale the HTTP server adapters as and when new nodes are added to the
cluster, the options All ASI nodes, All ASI nodes plus all Adapter
Container Nodes, and All Adapter Container Nodes are
introduced. Note: When you select the option All ASI Nodes and use war mode
for URI, you must use one of the following options to make the
.war file accessible
on all nodes:
|
Select a Group | Leave this set to:
Note: Do not use the HTTP Server adapter in groups.
|
HTTP Listen Port | The port number on which the Perimeter server process listens for connections from external trading partner HTTP clients. If a local-mode Perimeter server is chosen, this listen port is bound on the local computer. Valid values are 1 through 65536. On many operating systems, only the root user can bind on ports 1 through 1024. Required. |
Perimeter Server Name | List of available Perimeter servers, including local-mode Perimeter servers.
Required. Default is local-mode Perimeter server. Note: If you select ALL ASI nodes or All ASI nodes
plus all Adapter Container Nodes in the Environment field, only one option
"All and Local" is enabled. This is the default option.
|
Total Business Process queue depth threshold: | Indicates the maximum number of queued business processes allowed for this adapter. At this point, system load is too high to accept a new business process invoke request. If a value other than 0 is specified, the adapter will limit the number of business process requests put on the queue. If the SUM of business processes on all queues is less than the queue threshold value, processing occurs normally. For example, a queue threshold of 500 will stop a request if queue 4 has 300 business processes, queue 6 has 200, and queue 7 has 3. If the threshold is exceeded, the adapter returns a Service Unavailable message, which triggers senders to retry later. Valid value is any integer. 0 indicates no threshold (feature turned off). |
Document Storage | Where to store the body of the request document. Valid values are:
Note: For more information about document storage types,
see Managing Services and Adapters.
|
User Authentication Required | Whether to enable HTTP basic authentication. Valid values are:
|
Use SSL | Whether SSL Server authentication must be enabled or not. Valid values are:
|
System Certificate | Select a system certificate from the list. This is the private key that the SSL server will use. Required if Use SSL is Must. |
Cipher Strength | Specifies the strength of the algorithms (cipher suites) used to encrypt data.
Valid values are:
|
CA Certificate | Move one or more CA Certificates to the use column. These are the digital security certificates that the SSL server will use to authenticate the client. Optional. |
URI | Uniform Resource Indicator (URI) representing incoming requests. Add one or more URIs to represent incoming requests and the business process or web application (represented as a WAR file) associated with each. Required. |
Launch BP or WAR | Whether the URI launches a business process or WAR file. Default is Business Process. Required. |
Enter WAR File Path | Specifies WAR file to be launched by URI. Valid value is any accessible path. Required if WAR File is selected for Launch BP or WAR File field. |
Business Process | Specifies business process to be launched by URI. Select from the list of available business processes. Required if BP is selected for Launch BP or WAR File field. |
Send Raw Messages | Whether the raw message is presented to the business process. The term raw
denotes that the primary document associated with the business process contains HTTP headers. Valid
values are:
|
Run BP in sync mode | Whether to invoke Web services in synchronous mode. Valid values are:
|
Output from Adapter to Business Process
The following table describes the output from the HTTP Server adapter to the business process.
Field Name | Description |
---|---|
http-method | Indicates the HTTP method that is requested from the client. Note: The feature of
process data to output the http-method is available only in V5.2.6.3 or later.
|
http-request-uri | Target URI as specified by the Trading Partner. Required for applications that need it. For example, SOAP. |
transport-instance-id | Identifies the specific instance of the HTTP Server adapter on which the request was received. Valid value is a non-empty string that should not be fabricated. Each value is created for an HTTP Server adapter instance. Required. |
transport-session-id | Transport Session ID. Identifies the specific inbound connection on the HTTP Server adapter (identified by the transport instance id) on which the request was received and to which the response must be returned. 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. |
b2b-protocol | Identifies the protocol type, with a value of http. |
SyncModeBP | Indicates whether the BP has been bootstrapped in synchronous mode or not. Valid values are true and false. |
Redirect Root URI | Indicates if no context path is specified in the http request, then the request
is redirected to the context path specified by Redirect Root URI. For example, if /myfilegateway is specified, http://<hostname>:<port>/ or http://<hostname>:<port>/ is redirected to http://<hostname>:<port>/myfilegateway. |
Initial Process Data XML Document Example
The following example shows how the initial process data XML document looks:
<?xml version="1.0" encoding="UTF-8"?>
<ProcessData>
<PrimaryDocument SCIObjectID="server1:b1aebf:fa40ae79ca:-7209"/>
<b2b-protocol>http</b2b-protocol>
<transport-instance-id>TestHTTPServerAdapter-insecure_HttpAdapter_node1
</transport-instance-id>
<transport-session-id>Thu Jan 22 22:04:16 EST 2004:5</transport-session-id>
<http-request-uri>/reflect</http-request-uri>
</ProcessData>
Activity Types for this Service
- Get – Retrieves whatever information is identified by the http-request-uri
- Post – Requests that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the URI in the Request-Line .
- Put – Requests that the enclosed entity be stored under the supplied Request-URI.
- Delete – Requests that the origin server delete the resource identified by the Request-URI.
Enhancing HTTP Server Adapter Performance
To improve performance, the HTTP Server adapter enables you to specify a range of threads for handling events. The range, which is specified in the http.properties file, includes a Min Thread value and Max Thread value. If the Max Thread value is reached, any additional connection requests fail. The http.properties file is located in the properties folder under your application installation directory.
Enabling HTTP DELETE for 'war' deployments on HTTP Server Adapter
- Navigate to the /install_dir/noapp/etc directory and edit
webdefault.xml.in file by commenting out the
Disable DELETE
part as shown below:<!-- <security-constraint> <web-resource-collection> <web-resource-name>Disable DELETE</web-resource-name> <url-pattern>/*</url-pattern> <http-method>DELETE</http-method> </web-resource-collection> <auth-constraint/> </security-constraint> -->
- In the install_dir/bin directory, run one of the following commands:
- (For UNIX or Linux)
setupfiles.sh
- (For Windows)
setupfiles.cmd
- (For UNIX or Linux)
- Restart Sterling B2B Integrator.
Deploying the war files shipped with Sterling B2B Integrator using HTTP Server Adapter
URI | WAR File Path |
/dashboard |
/install_dir/noapp/deploy/admin.war |
/gbm
|
/install_dir/noapp/deploy/gbm.war |
/myaft |
/install_dir/noapp/deploy/myaft.war |
/myfilegateway |
/install_dir/ noapp/deploy/myfilegateway.war |
/aft |
/install_dir/ noapp/deploy/aft.war |
/filegateway |
/install_dir/ noapp/deploy/filegateway.war |
- When deploying
admin.war
to the HTTP Server adapter instance, the URL to deploy theadmin.war
file must be specified as/dashboard
. - When deploying the aft.war, filegateway.war,
myaft.war, and myfilegateway.war,
admin.war
must be deployed on the HTTP server adapter instance with the URI as/dashboard
.