首页 > 解决方案 > oracle12 c apex 使休息请求不起作用

问题描述

我正在尝试通过 oracle APEX向https://www.google.com发出示例休息 GET 请求。

这是我已经完成的项目列表。

  1. 下载证书并添加到钱包中。我运行了以下命令

开始 DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(host => 'google.com', ace => xs$ace_type(privilege_list => xs$name_list('connect', 'resolve','http'), principal_name => 'c##test1', principal_type => xs_acl.ptype_db)); 结尾;

开始 DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(host => 'google.com', ace => xs$ace_type(privilege_list => xs$name_list('connect', 'resolve','http'), principal_name => 'APEX_180100', principal_type = > xs_acl.ptype_db)); 结尾;

在此之后,我运行以下语句来检查 ACL:

从 dba_host_acls 中选择主机、lower_port、upper_port、acl;

我得到以下 ACL 值:

google.com          NETWORK_ACL_14C30EE65855448C85450D0900B07280 

看起来我已经恢复了一切。

我找到了钱包的路径,所以我在请求中包含了一个参数,如下所示:

select apex_web_service.make_rest_request(
    p_url => 'http://www.google.com', 
    p_http_method => 'GET',
       p_wallet_path => 'file:C:\app\Administrator\virtual\product\12.2.0\dbhome_1\owm\wallets\Administrator' ,
              p_wallet_pwd => 'test123'
              )
     from dual;

仍然出现以下错误:

ORA-29273: HTTP request failed
ORA-06512: at "APEX_180100.WWV_FLOW_WEB_SERVICES", line 1011
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 1127
ORA-06512: at "APEX_180100.WWV_FLOW_WEB_SERVICES", line 911
ORA-06512: at "APEX_180100.WWV_FLOW_WEB_SERVICES", line 1517
ORA-06512: at "APEX_180100.WWV_FLOW_WEBSERVICES_API", line 369

任何人都可以对这个问题有所了解吗?我已经搜索并检查了很多不同的帖子,但找不到解决此问题的帖子。

谢谢!

标签: restoracle-apexoracle12c

解决方案


If there is anyone interested, Got this working by doing the following:

Exported the DigiCert Global Root CA and the DigiCert SHA2 Secure Server CA from the site using FireFox and saved them as X509 Encoded .CRT files Imported the 2 DigiCert certificates ONLY with Wallet Manager, and saved the wallet.


推荐阅读