Implementing exit-http-headers user exits

Web Service SOAP-HEADER exit-http-headers user exit, called before the Web Service is invoked. InvokeService02, when a function named exit-http-headers exists, calls it from once to 100 times.

This user exit is called before the HTTP-HEADER (and SOAP-ENVELOPE) is passed to the Web Service. It allows you to set named values in the HTTP-HEADER, for example, username=MFuser.

Signature of Web Service HTTP-HEADER user exit function

The signature of this function is:

C terminology:

Function_Name(int headerNum, char * headerName, char * headerValue)

COBOL terminology:

 LINKAGE SECTION.
01 headerNum pic s9(9) COMP-5.*> = int
01 headerName pic X any length. *> 256 = Max Length
01 headerValue pic X any length. *> 8192 = Max Length
PROCEDURE DIVISION.
EXIT PROGRAM.
…
ENTRY "exit-http-headers" using
     By value headerNum
By reference headerName
By reference headerValue.
.
     …
     EXIT PROGRAM.

The variables:

headerNum
Number of the named value
headerName
Name of the named value
headerValue
Value of the named value

The variables use IMTK terminology:

headerNum
Input parameter

This user exit is called repetitively from once to 100 times. The headerNum is just the index of the C for loop. The end of the loop occurs when:

headerName
Output parameter, null terminated string
headerValue
Output parameter, null terminated string