Skip to Main Content
  • Questions
  • how to use UTL_HTTP with report generated by report query using Bi publisher

Breadcrumb

May 4th

Question and Answer

Chris Saxon

Thanks for the question, Wesam.

Asked: March 16, 2023 - 9:00 am UTC

Last updated: March 04, 2024 - 5:09 pm UTC

Version: 19.0.0.0.0

Viewed 1000+ times

You Asked

I tried to use UTL_HTTP with generated pdf from query report which is made using rtf file( BI pupplisher),
I created page to disply the report, and use the page url to add xml script to the pdf file,
but i always receive error message

(ORA-29273: HTTP request failed)
(ora_sqlcode: -29273
ora_sqlerrm: ORA-29273: HTTP request failed
 ORA-06512: at "APEX_220200.WWV_FLOW_PROCESS_NATIVE", line 55 
ORA-06512: at "APEX_220200.WWV_FLOW_CODE_EXEC_PLSQL", line 126 
ORA-06512: at "APEX_220200.WWV_FLOW_DYNAMIC_EXEC", line 2654 
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 line 37 
ORA-06512: at "SYS.DBMS_SYS_SQL", line 2120 
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_220200", line 837 
ORA-06512: at "APEX_220200.WWV_FLOW_DYNAMIC_EXEC", line 2614 
ORA-06512: at "APEX_220200.WWV_FLOW_CODE_EXEC_PLSQL", line 97
 ORA-06512: at "APEX_220200.WWV_FLOW_CODE_EXEC_PLSQL", line 430 
ORA-06512: at "APEX_220200.WWV_FLOW_CODE_EXEC", line 614 
ORA-06512: at "APEX_220200.WWV_FLOW_EXEC_LOCAL", line 3053 
ORA-06512: at "APEX_220200.WWV_FLOW_EXEC", line 2642
 ORA-06512: at "APEX_220200.WWV_FLOW_EXEC", line 2678 
ORA-06512: at "APEX_220200.WWV_FLOW_PROCESS_NATIVE", line 34 
ORA-06512: at "APEX_220200.WWV_FLOW_PROCESS_NATIVE", line 1230 
ORA-06512: at "APEX_220200.WWV_FLOW_PLUGIN", line 3163
component.type: APEX_APPLICATION_PAGE_PROCESS
component.id: 62841056118348574801)


could you help me to solve this problem .. thanks in advance

Part of Code
url :='https://apex.oracle.com/pls/apex/r/UserArea/AppName/testdirectreport?session=&SESSION.';
 v_req := UTL_HTTP.begin_request (url, 'POST', ' HTTP/1.1');
 UTL_HTTP.set_header (v_req, 'content-type', 'application/xml');
 UTL_HTTP.set_header (v_req, 'charset', 'UTF-8');
 UTL_HTTP.set_header (v_req, 'Content-Length', LENGTH (var));
 reqlength := DBMS_LOB.getlength (var);

and Chris said...

The problem is here:

ORA-24247: network access denied by access control list (ACL)


You need to configure the database's network access to allow UTL_HTTP to talk to other servers.

Read up on this in the docs:

https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/managing-fine-grained-access-in-pl-sql-packages-and-types.html#GUID-3D5B66BC-0277-4887-9CD1-97DB44EB5213

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Fabio, March 01, 2024 - 11:31 pm UTC

Same error here and i have no ideia how to fix it.

is_internal_error: true
apex_error_code: APEX.UNHANDLED_ERROR
ora_sqlcode: -29273
ora_sqlerrm: ORA-29273: falha na solicitação HTTP ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1182 ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 782 ORA-29268: erro do cliente HTTP 403 - Forbidden ORA-06512: em "SYS.UTL_HTTP", line 380 ORA-06512: em "SYS.UTL_HTTP", line 1148 ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 756 ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1023 ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1438 ORA-06512: em "APEX_220100.WWV_FLOW_WEBSERVICES_API", line 612 ORA-06512: em "APEX_220100.WWV_FLOW_PRINT_UTIL", line 789 ORA-06512: em "APEX_220100.WWV_FLOW_RENDER_QUERY", line 1876 ORA-06512: em "APEX_220100.WWV_FLOW_RENDER_QUERY", line 1930
component.type: APEX_APPLICATION_PAGES
component.id: 2669000000000
error_backtrace:
ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1182
ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 782
ORA-06512: em "SYS.UTL_HTTP", line 380
ORA-06512: em "SYS.UTL_HTTP", line 1148
ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 756
ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1023
ORA-06512: em "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1438
ORA-06512: em "APEX_220100.WWV_FLOW_WEBSERVICES_API", line 612
ORA-06512: em "APEX_220100.WWV_FLOW_PRINT_UTIL", line 789
ORA-06512: em "APEX_220100.WWV_FLOW_RENDER_QUERY", line 1876
ORA-06512: em "APEX_220100.WWV_FLOW_RENDER_QUERY", line 1930
ORA-06512: em "APEX_220100.WWV_FLOW", line 2980
Chris Saxon
March 04, 2024 - 5:09 pm UTC

Looks like you don't have access to whatever the web service you're trying to access is:

ORA-29268: erro do cliente HTTP 403 - Forbidden

You'll need to configure the access credentials for this.

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library