Experts,
Need help to resolve issues with accessing HTTPS webservices through PL/SQL
I'm on Oracle DB 12.1.0.2.
I did the below steps before accessing webservices through PL/SQL
orapki wallet create -wallet LABEL_GEN
orapki wallet add -wallet LABEL_GEN -trusted_cert -cert 'cert_file' -pwd password
orapki wallet add -wallet LABEL_GEN -trusted_cert -cert 'cert_file' -pwd password
orapki wallet add -wallet LABEL_GEN -trusted_cert -cert 'cert_file' -pwd password
orapki wallet display -wallet LABEL_GEN -pwd password
Code below worked perfectly fine when I did the above steps but it is failing after a disconnect/reconnect to the database session. Please check the code and error below.
DECLARE
lo_req UTL_HTTP.req;
lo_resp UTL_HTTP.resp;
BEGIN
UTL_HTTP.SET_WALLET ('file:WALLET_PATH','password');
lo_req := UTL_HTTP.begin_request('https://..URL..');
lo_resp := UTL_HTTP.get_response(lo_req);
dbms_output.put_line(lo_resp.status_code);
--dbms_output.put_line(lo_resp);
UTL_HTTP.end_response(lo_resp);
END;
/
Error report -
ORA-29273: HTTP request failed
ORA-29024: Certificate validation failure
ORA-06512: at "SYS.UTL_HTTP", line 368
ORA-06512: at "SYS.UTL_HTTP", line 1118
ORA-06512: at line 6
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.
Any inputs to this would be highly appreciated!!!