APEX_WEB_SERVICE.MAKE_REST_REQUEST 导致 ORA-29248:无法识别的 WRL 用于打开钱包

问题描述 投票:0回答:2

我正在尝试在 Oracle 12c/Apex 5.1 上使用

APEX_WEB_SERVICE.MAKE_REST_REQUEST
通过 SSL/TLS 访问其余 Web 服务。这会导致错误消息
ORA-29248: an unrecognized WRL was used to open a wallet
。我已经将必要的证书放入了oracle钱包中,并将其存储在代码中指定的位置。 oracle 用户可以访问它。完整代码和错误消息如下。

DECLARE
    l_clob           CLOB;
    l_param_names    apex_application_global.vc_arr2;
    l_param_values   apex_application_global.vc_arr2;
BEGIN

    apex_web_service.g_request_headers(1).name    := 'Content-Type';
    apex_web_service.g_request_headers(1).VALUE   := 'application/x-www-form-urlencoded';

    apex_web_service.g_request_headers(2).name    := 'apikey';
    apex_web_service.g_request_headers(2).VALUE   := 'this_is_the_api_key';

    l_param_names(1)                              := 'fist_param_name';
    l_param_values(1)                             := 'first_param_value';

    l_param_names(2)                              := 'second_param_name';
    l_param_values(2)                             := 'second_param_value';

    -- Get the XML response from the web service.
    l_clob :=
        APEX_WEB_SERVICE.make_rest_request(
            p_url           => 'https://example.com/rest/webservice',
            p_http_method   => 'POST', 
            p_parm_name     => l_param_names, 
            p_parm_value    => l_param_names,
            p_wallet_path   => '/path/to/wallet/dir', 
            p_wallet_pwd    => 'walletpassword');

    -- Display the whole document returned.
    DBMS_OUTPUT.put_line(l_clob);

END;

错误信息:

ORA-29273: HTTP-Anforderung nicht erfolgreich
ORA-29248: Ein nicht erkannter WRL wurde zum Öffnen eines Wallets verwendet
ORA-06512: in "SYS.UTL_HTTP", Zeile 368
ORA-06512: in "SYS.UTL_HTTP", Zeile 1118
ORA-06512: in "APEX_050100.WWV_FLOW_WEB_SERVICES", Zeile 666
ORA-06512: in "APEX_050100.WWV_FLOW_WEB_SERVICES", Zeile 880
ORA-06512: in "APEX_050100.WWV_FLOW_WEBSERVICES_API", Zeile 236
ORA-06512: in Zeile 20

ORA-29248的英文意思是:

ORA-29248: an unrecognized WRL was used to open a wallet
oracle plsql oracle12c
2个回答
9
投票

我找到了非常简单的解决方案。钱包路径必须以

file:
为前缀,如下所示:

-- Get the XML response from the web service.
l_clob :=
    APEX_WEB_SERVICE.make_rest_request(
        p_url           => 'https://example.com/rest/webservice',
        p_http_method   => 'POST', 
        p_parm_name     => l_param_names, 
        p_parm_value    => l_param_names,
        p_wallet_path   => 'file:/path/to/wallet/dir', 
        p_wallet_pwd    => 'walletpassword');

0
投票

您是否在自己的服务器上使用 Oracle APEX? 如果是这样,您是否必须创建一个钱包或者它已经存在了? 我已在 Azure Windows VM 上安装了 Oracle APEX 并托管它。 我正在尝试创建一个休息数据源,但它给了我同样的错误。 你能帮我一下吗?

错误如下; URL 调用期间发生错误。 ORA-29248: 使用无法识别的 WRL 打开钱包

© www.soinside.com 2019 - 2024. All rights reserved.