The exit-http-headers user exit is called before the Web Service is invoked. When a function named exit-http-headers exists, it is called from one to 100 times.
This user exit is called before the HTTP message 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 headers 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:
The variables use I/O terminology:
This user exit is called repetitively from once to 100 times. The headerNum is just the index of the loop. The end of the loop occurs when: