Facing a weird issue, where I am able to call utl_http.begin_request for a http site (after adding to ACL), but the same HTTP site when called with APEX_WEB_SERVICE.make_rest_request raises ORA-24247.
dba_HOST_ACES shows an entry for the site (server & port) , the db user id with the privilege of connect, resolve & http
Database version : 19.8.0.0.0 (VERSION_FULL from v$instance)
script executed as a dbuser
declare
url varchar2(4000) := 'http://server:port/app/site.jsf';
l_clob CLOB;
begin
l_clob := APEX_WEB_SERVICE.make_rest_request(
p_url => url,
p_http_method => 'GET'
);
-- Display the whole document returned.
DBMS_OUTPUT.put_line('l_clob=' || l_clob);
end;
Error report -
ORA-29273: HTTP request failed
ORA-06512: at "APEX_180200.WWV_FLOW_WEB_SERVICES", line 1017
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1148
ORA-06512: at "APEX_180200.WWV_FLOW_WEB_SERVICES", line 917
ORA-06512: at "APEX_180200.WWV_FLOW_WEB_SERVICES", line 1523
ORA-06512: at "APEX_180200.WWV_FLOW_WEBSERVICES_API", line 369
ORA-06512: at line 12
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.
Have tried adding the ACL for the db user AND for APEX_180200 with the privileges of connect, resolve , http - but still we see the same error.
The database (a PDB) was on 12c, and was recently upgraded in place to 19c. This is the first time we are calling APEX_WEB_SERVICE package.