Handling non-HTTP requests

Top  Previous  Next

To handle non-HTTP requests using XCICS Web support facilities, you need to code an analyzer program to determine processing for the requests, and application programs to provide responses to the requests. You also need to create some resource definitions.

The following components of XCICS Web support are used for processing non-HTTP requests:

TCPIPSERVICE resource definitions.
An analyzer program.
Converter programs, if required.
User-written application programs.
An alias transaction for the application programs.

URIMAP definitions are not used with non-HTTP requests.

Processing for HTTP requests and processing for non-HTTP requests are kept separate. Non-HTTP requests are received using the USER protocol, specified on the TCPIPSERVICE definition. This ensures that XCICS can perform basic acceptance checks on HTTP requests and responses, and that non-HTTP requests are not subjected to these checks. The acceptance checks would produce an error response for non-HTTP requests and the request would not be processed.

TCPIPSERVICE resource definitions are needed for non-HTTP requests. TCPIPSERVICE resource definitions for non-HTTP requests must specify the USER (user-defined) protocol. URIMAP resource definitions are not used when requests are received through the USER protocol.

Analyzer programs and non-HTTP requests

An analyzer program is required for processing non-HTTP requests. It can reconstruct requests that have been divided up for transmission across the network, specify code page conversion of the requests, and perform any parsing that is required to determine subsequent request processing.

Reconstructing a non-HTTP request

An incoming request may be divided into several parts for transmission across the network. For non-HTTP requests, XCICS does not reconstruct the request before calling the analyzer program, and you should write your analyzer code accordingly.

On entry to the analyzer, the user_data pointer addresses a COMMAREA which contains the first part of the incoming request. To receive the next part of the request, set the return code to URP_EXCEPTION and the reason code to URP_RECEIVE_OUTSTANDING. XCICS Web support invokes the analyzer again, and the user_data pointer addresses the next part of the message. You can repeat this process as many times as you need to until the entire request has been received, up to the maximum supported length of 32767 bytes.

The results of this process are not visible to the XCICS WEB API commands. However, the reconstructed message can be passed to a converter program.

Determining non-HTTP request processing

The following input fields which relate to HTTP requests are undefined in an analyzer program for non-HTTP requests:

The HTTP version
The method
The path component of the request
The request headers

The subsequent processing stages must therefore be determined by examining the content of the request.

The analyzer program can specify subsequent request processing by a converter program, or by a Web-aware application program. "Writing an analyzer program"  explains the inputs and outputs from an analyzer program, and how these are used to determine request processing.