Information for an HTTP Configuration is in two parts:
Identification
This identifies the HTTP Configuration and contains basic information.
HTTP Configuration ID |
An identifier to uniquely identify this Configuration |
Description |
This should describe the Configuration. |
HTTP direction |
Inbound or Outbound. The remaining details shown will vary according to the direction that is chosen. |
Configuration Status |
Active or Inactive. Configurations cannot be used in a processing sequence while they are in inactive status – supplied activities will end in error if they attempt to use a configuration that has inactive status. |
Details
The details section will vary according to the HTTP direction specified in the Identification section.
An inbound HTTP configuration connects your designated Processing Sequence with a particular form of inbound HTTP request, via JSMDirect, based on a unique Application name value that you assign and that the HTTP client will use in the URI that will be used to send the HTTP request.
For more information, refer to:
HTTP Inbound (Server) Processing in LANSA Composer
Connect Your Processing Sequence to an Inbound HTTP Request.
Processing Sequence ID |
This must contain the name of the Processing Sequence that is to process the inbound HTTP request. This Processing Sequence should contain one or more HTTP inbound activities that will receive and process the request and send any response. |
Application Name |
This is the application name that will be used as the service name in the JSMDirect service table and that the HTTP client will use in the URI that will be used to send the HTTP request. The Application name value should be unique. |
Local Host |
This is the host name which will be registered in the JSMDirect service table. It will default to *DEFAULT. |
OK HTTP response message |
This optional entry may contain the text which is to be sent for an OK response |
NOTE: The remaining fields in the inbound HTTP configuration are for advanced use.
Standard LANSA Composer HTTP inbound processing uses the supplied function DXHTFN1 to begin the processing of the inbound HTTP request as described in Connect Your Processing Sequence to an Inbound HTTP Request. You will only change the following values from the defaults if you wish to alter or customize this mechanism.
Handler Type |
Select from Function or IBM i 3GL. |
For a Handler Type of Function:
Process Name |
This must be the process which contains the Function specified in the following parameter. This defaults to DXPROC02. |
Function Name |
This is the function that will be invoked by JSMDirect when an inbound HTTP transmission with the specified Application Name in the URI is received. |
Partition |
This must be the LANSA partition which contains the function to be invoked. |
Language |
This must contain the LANSA execution language. |
For a Handler Type of IBM i 3GL:
3GL Program |
This should contain the program name when a Handler Type of IBM i 3GL is selected. |
The outbound HTTP Configuration is for use in an Activity which sends HTTP requests to a remote HTTP server.
For more information, refer to:
HTTP Outbound (Client) Processing in LANSA Composer
Remote host |
This must contain the remote HTTP server and, if necessary, the port number. The format is host:port If the port is not supplied, it will default to 80. |
URI |
This must contain the remainder of the URI to be used to connect to the remote server. |
Proxy server |
If a proxy server is being used, enter the proxy server name. |
Secure Protocol |
Select Yes to use HTTPS (secure protocol) for the HTTP connection. Select No to use use standard HTTP protocol. |
SNI host name |
This field is shown only when Yes is specified for Secure protocol. It provides support, if required, for the Server Name Indication (SNI) extension to the TLS protocol that may be implemented by webservers that allow multiple secure (HTTPS) websites to be served from the same IP address. Choose (Do not use Server Name Indication) from the drop-down list (or leave the entry field blank) if your HTTP outbound request does not need to use SNI to connect to the specified remote host server. Choose (Use remote host name) from the drop-down list to use the value specified for Remote host as the SNI host name. Otherwise, type the SNI host name to use when establishing the HTTPS connection to the remote host. IMPORTANT NOTE: LANSA Composer can only support SNI when the Java Virtual Machine (JVM) used by LANSA Integrator on the LANSA Composer server is at Java version 1.8 or greater. |
Authentication user |
If authentication is required, this contains the basic authentication user. |
Authentication password |
If authentication is required, this contains the password which is used with the Authentication user. |
Wait for response |
Select from Yes or No. Select Yes if you want the HTTP connection to wait for a response. |
Response timeout |
If you specified Yes for the Wait for response, then this field can specify a timeout for the response wait, in milliseconds. For example, specify 5000 for a timeout value of five seconds. If zero (or a negative value) is specified, then no response timeout applies. |
Connection timeout |
This field can specify a timeout for the host connection to be established, in milliseconds. For example, specify 5000 for a timeout value of five seconds. If zero (or a negative value) is specified, then no connection timeout applies. |
Content type |
You may select the content type of the payload which will be sent: |
|
*XML |
application/xml |
|
*TEXTXML |
text/xml |
|
*TEXTPLAIN |
text/plain |
|
*SOAP |
application/soap+xml |
|
*HTML |
text/html |
|
*XHTML |
application/xhtml+xml |
|
*CSV |
application/comma-separated-values |
|
*TEXTCSV |
text/ x-comma-separated-values |
|
*TSV |
application/comma-separated-values |
|
*TEXTTSV |
text/ x-tab-separated-values |
|
*X12 |
application/edi-x12 |
|
*EDIFACT |
application/edifact |
|
*STREAM |
application/octet-stream |
|
|
application/pdf |
|
*JSON |
application/json |
|
*EXCEL |
application/vnd.ms-excel |
|
*ZIP |
application/zip |
|
*GIF |
image/gif |
|
*PNG |
image/png |
|
*JPEG |
image/jpeg |
|
*MPEG |
audio/mpeg |
|
*MPEG4 |
video/mpeg4 |
|
Most often, however, you may leave the default Automatic setting, which will result in the applicable HTTP activity setting an appropriate content type according to the file extension of the file being sent. (This is achieved by a lookup on the file filetype.txt in the <system> directory of the server's JSM instance directory tree.) |
Encoding |
You may enter an encoding which will be used to convert the content to Unicode. |
Content file directory |
You may enter the local directory path which contains the content file. You can click the prompt button to browse for a folder location on the LANSA Composer server. NOTE: Although you can identify a specific content directory and file here as part of the HTTP configuration, it is more common to leave them blank and specify them dynamically on the parameters of the applicable HTTP activity in your Processing Sequence. |
Content file name |
You can enter the content file name. This file will be used as the payload of the HTTP transmission. NOTE: Although you can identify a specific content directory and file here as part of the HTTP configuration, it is more common to leave them blank and specify them dynamically on the parameters of the applicable HTTP activity in your Processing Sequence. |
Note: A Test button can be used to check the validity of the parameters for Outbound HTTP Configuration. The parameters tested are: Remote host, Proxy server, Secure protocol, SNI host name, Authentication user and password, and Connection and Response timeout values, if applicable.