com.WebService.registerOutputRequestHandler
Registers the function to be executed just before the SOAP response is forwarded to the client.
Syntax
registerOutputRequestHandler(
function STRING )
- function has the name of a program function.
Usage
The registerOutputRequestHandler()
method registers a function to be called just
after the SOAP engine has processed the request and before the SOAP response is forwarded to the
client.
xml.DomDocument
, and must return the
reference to this
object:FUNCTION myRequestOutputHandler( out )
DEFINE out xml.DomDocument
...
RETURN out
END FUNCTION
The output callback function typically modifies the content of the SOAP output request DOM document object passed as parameter.
If NULL
was returned from the input callback function, the output callback
function will be called with the default SOAP fault node.
When WS-Addressing is enabled, and the server side callback is triggered, the SOAP engine has already created the SOAP:Header node with the correct WS-Addressing entries. If other headers need to be added (for WS-Security for instance), it is recommended to add them as child nodes of the existing SOAP header node, instead of creating a new header node. Otherwise, you may get two SOAP headers in a same response, which is not allowed.
In case of error, the method throws an exception and sets the
STATUS
variable. Depending on the error, a human-readable description of the
problem is available in the SQLCA.SQLERRM
register. See Error handling in GWS calls (STATUS).