HTTP_BEGIN_OUTBOUND

This activity establishes an HTTP outbound session and returns a "handle" in the HTTP_HANDLE parameter that can be used to identify this session for use in other HTTP activities.

It is possible (though it may be unusual) to have more than one HTTP session active at one time in a single Processing Sequence.

For more information on the use of HTTP activities and configurations in LANSA Composer to perform outbound (client) HTTP processing, please refer to:

HTTP Outbound (Client) Processing in LANSA Composer

 

Related HTTP activities

When the HTTP outbound processing is complete, you should close the session using the HTTP_END activity.

In between the HTTP_BEGIN_OUTBOUND and HTTP_END activities, you may use one or more of the following activities, according to your requirements, to prepare and send the outbound request:

HTTP_MULTIPART_SET

Set outbound multipart component item

HTTP_PROPERTY_SET

Set HTTP protocol property value(s)

HTTP_SEND

Send request to HTTP server

HTTP_SEND_FILE

Send file to HTTP server

HTTP_SEND_MULTI

Send multipart content to HTTP server

HTTP_SEND_NAMEVAL

Send name-value pairs to HTTP server

 

After successfully sending the HTTP request, you may use one or more of the following activities to receive the HTTP response:

HTTP_MULTIPART_GET

Get inbound multipart component item

HTTP_PROPERTY_GET

Get HTTP protocol property value(s)

HTTP_RECEIVE_FILE

Receive a single file HTTP payload

HTTP_RECEIVE_MULTI

Receive HTTP payload as multipart content

HTTP_RECEIVE_NAMEVAL

Receive HTTP payload as name-value pairs

 

If you wish to send further HTTP requests you should use the following activity before preparing and sending the next request:

HTTP_RESET

Reset for further HTTP outbound requests

 

Eligibility for Processing Sequence Restart

When a LANSA Composer Processing Sequence run ends in error, it is often possible to restart it from the point of failure—once the cause of the failure has been corrected. This is a very powerful feature of LANSA Composer.

For a LANSA Composer solution using the HTTP activities, processing sequence restart is NOT possible between the HTTP_BEGIN_OUTBOUND and HTTP_END activities.

To maximize the benefit of LANSA Composer's restart capability, you should complete your HTTP request processing and execute the HTTP_END activity at the earliest opportunity. Once the HTTP session has been closed, normal restart eligibility resumes.

Example Processing Sequences using the HTTP Activities

The supplied example Processing Sequence EXAMPLE_HTTPGET2 demonstrates the use of HTTP_BEGIN_OUTBOUND and other advanced HTTP activities to retrieve a file from an HTTP server.  Refer to the notes accompanying the example Processing Sequence for details.

Refer to Example Processing Sequences for information on installing and using the example Processing Sequences.

INPUT Parameters:

HTTP_CONFIG: Required

This parameter must specify the name of an HTTP outbound configuration that specifies most of the parameters necessary to establish the connection to the HTTP server.  Selected attributes of the HTTP outbound configuration may be overridden by the other parameters to this or other HTTP activities.

HTTP_URI: Optional

This parameter specifies an alternate value used to override the URI that is specified in the HTTP outbound configuration. If used, the value should specify the URI to be used to connect to the remote host specified in the HTTP outbound configuration.  If this parameter is not specified, then the value will be taken from the HTTP configuration.

OUTPUT Parameters:

HTTP_HANDLE:

If successful, the value of this output parameter identifies the HTTP outbound session established by this instance of the HTTP_BEGIN_OUTBOUND activity.  The same value must be specified as the HTTP_HANDLE input parameter value for all subsequent HTTP activities that are to operate on the same HTTP session.