Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Huy.

Asked: October 27, 2020 - 2:47 am UTC

Answered by: Connor McDonald - Last updated: November 20, 2020 - 3:54 am UTC

Category: Application Express - Version: 20.1.0.00.13

Viewed 100+ times

You Asked

Hi everyone,
I have one web page name sth like that: ' https://bus/api/check' When I run this web, it returns data normally. But when I create web source module, it shows me as below

An error occurred during URL invocation.

ORA-29024: Certificate validation failure
I search on GG about that problem. I try to solve my problem follow this web:
https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6121/index-en.html

It is very cleart. I created new wallet named https_wallet and added certificate successfully. Howerver, I check by select statement on DB, with code:

select APEX_WEB_SERVICE.make_rest_request(p_url => ''https://bus/api/check',p_http_method => 'GET',p_wallet_path => 'file:C:/temp/wallet/https_wallet',p_wallet_pwd => 'pass_word') from dual;


It shows HTTPS request failed and security violation. I don't know why that reason. I tried those steps on Google web, I can get certificate successfully. Now my certificate is from Amazone. I check web via checkssl online, everything it is ok, but I don't understand when I check serial number of the first of certificate, it shows me serial number is 00. Can anyone help me to solve my those problem. I do not have much experience in create web source module. Thank in advance.





Ask about Web Source Module

and we said...

Take a look at this post from Tim Hall about getting all the correct pieces in play for certificates to work properly

https://oracle-base.com/articles/misc/utl_http-and-ssl

and you rated our response

  (3 ratings)

Reviews

continue to get error on https

November 18, 2020 - 1:59 am UTC

Reviewer: Huy Nguyen

Hi everyone,
Your tutorial is very nice. When I try to follow those step, I run it on DB

select apex_web_service.make_rest_request(p_url => 'https://bus.com',
p_http_method => 'GET',p_wallet_path => 'file:C:\oracle\ODB12C\product\12.2.0\dbhome_1\owm\wallets',
p_wallet_pwd => 'my password')
from dual; 


It shows me the result as below:
ORA-29273: HTTP request failed
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 1285
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 924
ORA-29024: Certificate validation failure
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1127
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 902
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 1138
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 1475
ORA-06512: at "APEX_200100.WWV_FLOW_WEBSERVICES_API", line 416
ORA-06512: at line 1

View program sources of error stack?

Can you help me clear that? Thank you for your time.

Show my wallet

November 18, 2020 - 2:26 am UTC

Reviewer: Huy Nguyen



I check wallet to show certificate I added to wallet. All of certifications of that web have had in wallet.

C:\oracle\ODB12C\product\12.2.0\dbhome_1\owm\wallets>orapki wallet display -wallet C:\oracle\ODB12C\product\12.2.0\dbhome_1\owm\wallets
Oracle PKI Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.

Requested Certificates:
User Certificates:
Trusted Certificates:
Subject: CN=Amazon Root CA 1,O=Amazon,C=US
Subject: CN=Amazon,OU=Server CA 1B,O=Amazon,C=US
Subject: CN=USERTrust RSA Certification Authority,O=The USERTRUST Network,L=Jersey City,ST=New Jersey,C=US
Subject: CN=*.google.com,O=Google LLC,L=Mountain View,ST=California,C=US
Subject: CN=edufit.vn
Subject: CN=Starfield Services Root Certificate Authority - G2,O=Starfield Technologies\, Inc.,L=Scottsdale,ST=Arizona,C=US
Subject: OU=Starfield Class 2 Certification Authority,O=Starfield Technologies\, Inc.,C=US
Subject: CN=Google Internet Authority G3,O=Google Trust Services,C=US
Subject: CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R2
Connor McDonald

Followup  

November 18, 2020 - 11:59 pm UTC

Are you on 12c database?

If so, check out this MOS note

In Oracle 12c UTL_HTTP Fails With ORA-29024 After Importing WebServer's Certificate into the Oracle Wallet (Doc ID 1682823.1)

Thank you

November 19, 2020 - 7:34 am UTC

Reviewer: Huy Nguyen

Thank you for your help. I am successfully to get https request. I mention that, for oracle 12, select utl_http.request needs an parameter https_host to call API.
Connor McDonald

Followup  

November 20, 2020 - 3:54 am UTC

glad we could help

More to Explore

PL/SQL

Check out more PL/SQL tutorials on our LiveSQL tool.