59.24 PARSE_RESPONSE Function
This function parses the response from a Web service that is stored in a collection and returns the result as a VARCHAR2 type.
Syntax
APEX_WEB_SERVICE.PARSE_RESPONSE (
p_collection_name IN VARCHAR2,
p_xpath IN VARCHAR2,
p_ns IN VARCHAR2 DEFAULT NULL )
RETURN VARCHAR2;
Parameters
Parameter | Description |
---|---|
p_collection_name |
The name of the collection where the Web service response is stored. |
p_xpath |
The XPath expression to the desired node. |
p_ns |
The namespace to the desired node. |
Example
The following example parses a response stored in a collection called STELLENT_CHECKIN
and stores the value in a locally declared VARCHAR2
variable.
declare
l_response_msg VARCHAR2(4000);
BEGIN
l_response_msg := apex_web_service.parse_response(
p_collection_name=>'STELLENT_CHECKIN',
p_xpath =>
'//idc:CheckInUniversalResponse/idc:CheckInUniversalResult/idc:StatusInfo/idc:statusMessage/text()',
p_ns=>'xmlns:idc="http://www.stellent.com/CheckIn/"');
END;
Parent topic: APEX_WEB_SERVICE