Response header handler for returning a header for reuse
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
This is the SOAP response header handler (RespHandler) that returns the
header that is reused for passing around the AccessID value:
Response header handler saving a SOAP response header for reuse
|
The code in the preceding example:
-
Receives the SOAP response header using the
hHeaderparameter -
Tests if the global header handle (
g_header) already references a valid object, and:-
If it does not reference an object, the handler must be running as part of the initial
call to
OpenAccessand thus saves the input SOAP header object (hHeader) to the global context (g_header) for use by subsequent requests. From this moment forward, all requests to the Web service discard the header object input to the response handler as unnecessary. -
If it does reference an object, the handle must already reference a SOAP response
header returned in a prior request (the call to
OpenAccess) and has no need of a subsequent response header. It therefore deletes the unnecessary SOAP header object returned to the handler through thehHeaderparameter in order to prevent a memory leak accumulating in subsequent requests.
-
If it does not reference an object, the handler must be running as part of the initial
call to