commit
8a46dc2719
@ -260,6 +260,7 @@ is
|
|||||||
l_hdr_value varchar2(1024);
|
l_hdr_value varchar2(1024);
|
||||||
l_hdr header;
|
l_hdr header;
|
||||||
l_hdrs header_table;
|
l_hdrs header_table;
|
||||||
|
l_returnvalue xmltype;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
-- determine database characterset, if not AL32UTF8, conversion will be necessary
|
-- determine database characterset, if not AL32UTF8, conversion will be necessary
|
||||||
@ -389,13 +390,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
utl_http.end_response(l_http_resp);
|
utl_http.end_response(l_http_resp);
|
||||||
|
|
||||||
|
begin
|
||||||
|
l_returnvalue := xmltype.createxml( l_clob );
|
||||||
|
exception when others then
|
||||||
|
if sqlcode = -31011 then -- invalid xml
|
||||||
|
raise_application_error( -20001, 'HTTP response could not be converted to XML. Response was (first 1000 characters): ' || dbms_lob.substr( l_clob, 1000 ));
|
||||||
|
end if;
|
||||||
|
end;
|
||||||
|
dbms_lob.freetemporary( l_clob );
|
||||||
|
|
||||||
return xmltype.createxml(l_clob);
|
return l_returnvalue;
|
||||||
|
|
||||||
exception when others then
|
|
||||||
if sqlcode = -31011 then -- its not xml
|
|
||||||
return null;
|
|
||||||
end if;
|
|
||||||
end make_request;
|
end make_request;
|
||||||
|
|
||||||
function make_rest_request(
|
function make_rest_request(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user