Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm new to Oracle PL/SQL Development and I need to call few 3rd party REST APIs (Through https) from Oralce SQL Developer using `UTL_HTTP` package. When calling an API, Oracle shows the following error message...

*Cause: The certificate sent by the other side could not be validated. This may occur if
the certificate has expired, has been revoked, or is invalid for another reason.
*Action: Check the certificate to determine whether it is valid. Obtain a new certificate,
alert the sender that there certificate has failed, or resend.

So I guess that, since the call is https; we need to add this SSL certificate to Oracle Wallet before calling the API.

Which certificate that we should add to the wallet? Is it the certificate that we could download using our browser as a *.cer file?
Clicking padlock icone --> Connections--> Certificate Information --> Export

Even I've added this certificate to wallet its not working and giving the above arror.

Note: We are using Oracle 11g and use Oralce SQL Developer for calling APIs. Also we have enabled internet access in our Oracle testing envoronment.

This is a sample API request

req := UTL_HTTP.BEGIN_REQUEST('https://www.example.com/api/job/all', 'GET', 'HTTP/1.1');

Any thoughts?
Posted
Updated 22-Apr-15 20:45pm
v2
Comments
Jacob Himes 29-Apr-15 0:00am    
What exactly are you trying to do if you don't mind me asking? Are you trying to create a stored procedure that hits a rest api then inserts data into some tables? It might be best to implement this in a webservice or webjob of some sort. At my work we would never do a middleware task such as this in our database.
Chathur 8-Jun-15 2:32am    
@Jacob Himes, Thanks for your reply. Actually the environment that I'm working on is Oracle Applications and basicaly my adea is to create a pl sql package and call it from a scheduled concurrent progame daily basis. Now I've done the coding part but getting certificate validation failure as https is used. though i've added certificats to oracle wallet still have the same issue.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900