4

I am using soap_api as in the link http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php. I was able to call a web service in

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
"CORE   10.2.0.1.0  Production"
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

But When i use the same in

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE   11.2.0.1.0  Production"
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

Its giving

"ORA-29273: HTTP request failed
 ORA-06512: at "SYS.UTL_HTTP", line 1130
 ORA-24247: network access denied by access control list (ACL)"

Please help

Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55
paramupk
  • 626
  • 1
  • 11
  • 32
  • 3
    Similar: [ http://stackoverflow.com/questions/9875257/how-can-a-add-acl-rules-for-oracle-11g-to-allow-pl-sql-upload-file][1] [1]: http://stackoverflow.com/questions/9875257/how-can-a-add-acl-rules-for-oracle-11g-to-allow-pl-sql-upload-file – Jokke Heikkilä Mar 27 '12 at 12:30
  • Thanks.. My wsdl file is at http://xx.xxx.xx.xxx:9080/WesService/WebMethod/WebMethod.wsdl so what procedure i have to right ?? – paramupk Mar 27 '12 at 12:57
  • 2
    You have to add acl permissions to that xx.xxx.xx.xxx web address :) and to that specific port, or leave ports null then all ports are allowed to be used. – Jokke Heikkilä Mar 28 '12 at 06:14
  • I am able to resolve this when i try to query(SP) by myself in query browser, But when the SP is executed via Advanced Queuing (which is called after insert trigger) its not working??? – paramupk May 08 '12 at 08:42
  • Have you tried to add ACL permissions? If so, please provide us the script which you used. – Jokke Heikkilä May 09 '12 at 09:27
  • Sorry i dont have the script i gave the link to DBA he only executed – paramupk May 09 '12 at 11:20

1 Answers1

2

Oracle allows access to external network services using several PL/SQL APIs (UTL_TCP, UTL_SMTP, UTL_MAIL, UTL_HTTP and UTL_INADDR), all of which are implemented using the TCP protocol. You need to create one ACL (access control list ) for this. Bellow scripts may be useful in this case as worked for me . In my case : i am using SYS.UTL_HTTP to call one SOAP based web service from pl/sql level .

begin
  dbms_network_acl_admin.create_acl (
  acl          => 'networkacl.xml',
  description  => 'Allow Network Connectivity',
  principal    => 'PUBLIC',
  is_grant     => TRUE,
  privilege    => 'connect',
  start_date   => SYSTIMESTAMP,
  end_date     => NULL);
 dbms_network_acl_admin.assign_acl (
  acl         => 'networkacl.xml',
  host        => 'AS NEEDED*',
  lower_port  => AS NEEDED*,
  upper_port  => AS NEEDED*);
  commit;
end;

You may take a look : here

  • AS NEEDED = define yourself based on your requirement
Asraful
  • 1,241
  • 18
  • 31
  • 1
    That grants *every* database user the right to connect to *every* host on *every* port - seems kind of overkill and an outright invitation for DOS attacks. – Frank Schmitt Mar 17 '14 at 07:30
  • I granted related principal but now I'm getting ORA-06512: at "SYS.UTL_HTTP", line 1415 do you have any suggestion? I also granted execution right on utl_http to my user – Oguen Nov 27 '19 at 14:57