DFHWBERX, web error application program

DFHWBERX uses the EXEC CICS WEB and DOCUMENT API commands to obtain information about the web client request and then it creates and sends the error response. It is called as an application program. DFHWBERX can be specified by an analyzer program or as the PROGRAM attribute in a URIMAP definition if an error response is always wanted for the request.

DFHWBERX is used when the CICS-supplied default analyzer DFHWBAAX is specified as the analyzer program on the TCPIPSERVICE definition, and no matching URIMAP definition is found for a request. DFHWBAAX sets DFHWBERX as the application program to handle the request, using the wbra_server_program output parameter.

DFHWBERX is user-replaceable. CICS® supplies the source code for DFHWBERX in assembly language only.

DFHWBERX does not receive a parameter list or a default HTTP response from CICS.

DFHWBERX provides an error response as follows:
  • If the web client request is a POST request with media type text/xml, it is assumed to be a SOAP 1.1 request, and a SOAP 1.1 fault response is returned.
  • If the request is a POST request with media type application/soap+xml, it is assumed to be a SOAP 1.2 request, and a SOAP 1.2 fault response is returned.
  • All other requests are assumed to be a standard HTTP request, so a suitable HTTP response is composed and returned with a 404 (Not Found) status code.
DFHWBERX uses these commands:
  • EXEC CICS WEB EXTRACT, to obtain the URL of the web client request for which an error response is needed.
  • EXEC CICS DOCUMENT, to construct the message body.
  • For SOAP fault responses, EXEC CICS WEB WRITE HTTPHEADER, to write an appropriate SOAP action header.
  • EXEC CICS WEB SEND, to specify an appropriate status code and send the response to the web client. The UTF-8 character set is specified for code page conversion of the response body.

DFHWBERX does not use the EXEC CICS WEB RECEIVE command to receive the content of the web client request. If you are replacing DFHWBERX with your own application program, do not use this command. If you are using the CICS-supplied default analyzer DFHWBAAX, DFHWBERX is used to send an error response to any request that is not matched by a URIMAP definition. The content of these requests cannot be known, and their intent might be malicious, so it is not advisable to attempt to receive the request.