【问题标题】:Error ORA-29259: end-of-input reached calling utl_http.begin_request错误 ORA-29259:调用 utl_http.begin_request 到达输入结束
【发布时间】:2019-04-12 11:13:42
【问题描述】:

我正在尝试连接到 Royal Mail SOAP API,但无法通过开始请求阶段。

证书已添加到钱包中,它适用于 DPD 和其他 Web API。

DECLARE
    wk_http_request utl_http.req;
BEGIN
    utl_http.set_wallet('file:/app/oracle/admin/A11/wallet', NULL);
    wk_http_request := utl_http.begin_request('https://api.royalmail.net/shipping/v2', 'POST', utl_http.http_version_1_1);
END;
/  

给出错误:

ORA-29259: end-of-input reached
ORA-06512: at "SYS.UTL_HTTP", line 1128
ORA-06512: at line 5
29259. 00000 -  "end-of-input reached"
*Cause:    The end of the input was reached.
*Action:   If the end of the input is reached prematurely, check if the input
           source terminates prematurely.  Otherwise, close the connection
           to the input.

无论我是否包含设置的钱包行,我都会得到相同的结果。

这运行没有错误:

DECLARE
    wk_http_request utl_http.req;
BEGIN
    utl_http.set_wallet('file:/app/oracle/admin/A11/wallet', NULL);
    wk_http_request := utl_http.begin_request('https://api.dpd.co.uk', 'POST', utl_http.http_version_1_1);
END;
/

任何人都可以通过 Oracle PL/SQL 连接到 Royal Mail API 吗? 我们的版本是 11.2.0.3.0。

【问题讨论】:

    标签: oracle api soap oracle11g


    【解决方案1】:

    我在使用 Oracle DB 11.2.0.4 并尝试连接 oracle ERP Cloud 和 oracle Integration Cloud Service 时遇到同样的错误。

    我的研究得出结论,需要修补 Oracle 11g 才能使用 TLS 1.2 according to this link

    这是Royalmail处理的TLS证书列表

    List of TLS supported by https://api.royalmail.net

    这里是 api.dpd.co.uk 处理的 TLS 证书列表

    List of TLS supported by https://api.dpd.co.uk

    Oracle 11g 最初不适用于 TLS 1.2,因此您需要修补数据库才能使用此证书。

    希望这可能会有所帮助。

    【讨论】:

    • 谢谢 Jorge,我现在用 11.2.0.4 构建了另一个测试数据库,我们已经应用了补丁来处理 TLS 1.2。这让我们克服了这个问题。即使我们在 Oracle 钱包中拥有所有证书,我现在也收到“无效证书”错误。
    • 您是否收到ORA-29024错误?,如果是,那么根据文档,您应该检查证书以确定它是否有效,检查以确保服务器的钱包具有适当的信任点验证客户端的证书,或者确保证书没有被吊销(重新下载证书)。我也认为这个链接可能会有所帮助oracle-base.com/articles/misc/utl_http-and-ssl。祝你好运!!
    • 感谢 Jorge,这看起来是一个有用的链接,我将尝试所有建议。我们确实通过反向代理服务器想出了一个解决方法。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-10
    • 2011-09-15
    • 2017-03-12
    相关资源
    最近更新 更多