59.10 CLOBBASE642BLOB Function
This function converts a CLOB datatype that is base64-encoded into a BLOB. This is often used when receiving output from a Web service that contains a binary parameter.
Syntax
APEX_WEB_SERVICE.CLOBBASE642BLOB (
p_clob IN CLOB)
RETURN BLOB;Parameters
| Parameter | Description |
|---|---|
p_clob |
The base64-encoded CLOB to convert into a BLOB.
|
Example
The following example retrieves a base64-encoded node from an XML document as a CLOB and converts it into a BLOB.
DECLARE
l_base64 CLOB;
l_blob BLOB;
l_xml XMLTYPE;
BEGIN
l_base64 := apex_web_service.parse_xml_clob(l_xml, ' //runReportReturn/reportBytes/text()');
l_blob := apex_web_service.clobbase642blob(l_base64);
END;Parent topic: APEX_WEB_SERVICE