Called when the web service receives a request message, if there is no security error; this callback is not invoked in the case of a security error. The system invokes this callback after performing security processing, after checking the envelope for errors, and after processing the actions specified in the WS-Addressing header (if any). This callback is useful for tasks such as logging raw SOAP requests.
This method has the following signature:
Method OnRequestMessage(mode As %String, action As %String, request As %Stream.Object)
Where:
-
mode specifies the type of SOAP request. This is either "SOAP" or "binary".
-
action contains the value of SOAPAction header.
-
request contains the SOAP request message in a stream.
This method can use the object %request, which is an instance of %CSP.SessionOpens in a new tab. In this object:
This method can also use properties of the web service instance. The following properties are set during initialization:
-
The ImportHandler property contains the DOM for parsed SOAP request message.
-
The SecurityIn property contains the WS-Security header element. For details, see Securing Web Services.
-
The SecurityNamespace property contains the namespace for the WS-Security header element.
-
The SoapFault property is set if SOAP fault has been generated.
To return a fault within OnRequestMessage(), set the SoapFault property. Do not call the ReturnFault() method.