我正在尝试通过执行PL / SQL代码将一些数据发布到使用APEX的网站上。
问题是,该网站的证书是自签名的,因此未得到正确的认证,并且出现以下错误:
ORA-29273:HTTP请求失败ORA-06512:在“ SYS.UTL_HTTP”行1130中ORA-28860:严重的SSL错误
我正在使用以下代码:
过程publish_error_tickets
是
req utl_http.req; res utl_http.resp; url varchar2(4000) := 'https://some_url'; name varchar2(4000); buffer varchar2(4000); content varchar2(4000) := '{ "issue": { "project_id": 1, "subject": "Example", "priority_id": 4 } }'; begin req := utl_http.begin_request(url, 'POST',' HTTP/1.1'); utl_http.set_header(req, 'user-agent', 'mozilla/4.0'); utl_http.set_header(req, 'content-type', 'application/json'); utl_http.set_header(req, 'Content-Length', length(content)); utl_http.write_text(req, content); res := utl_http.get_response(req); begin loop utl_http.read_line(res, buffer); dbms_output.put_line(buffer); end loop; utl_http.end_response(res); exception when utl_http.end_of_body then utl_http.end_response(res); end; end;
我的问题是,是否有可能以某种方式忽略http消息的证书验证过程?必须有一种方法可以访问网站,而无需为该网站购买经过验证的证书。
在此先感谢Tamas
对于遇到相同问题的任何人,我都可以使用带有反向代理的Jeffrey Kemp发布的解决方案(http://blog.rhjmartens.nl/2015/07/making-https-webservice-requests-from.html),它就像一个魅力!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句