To invoke web service from oracle database is a bit complicated.
From user : HR , we're going to invoke a web service from https://www.oracle.com .
Here are the steps to connect your oracle db to ssl websites :
1-Add your site to the ACL :
login as sysdba :
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give APEX_050100
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'HR',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'HR', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets users to connect to localhost',
'HR', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;
3- Download certificate files using firefox browser , you'll download two crt files
4-Create empty wallet using Orapki tool :
5-Create Empty Wallet
orapki wallet create -wallet C:\oracle\db_home\wallet\https_wallet -pwd oracle123 -auto_login
6- Add first Certificate to Wallet
orapki wallet add -wallet C:\oracle\db_home\wallet\https_wallet -cert
C:\oracle\db_home\wallet\https_wallet\DigiCertTLS.crt -trusted_cert -pwd oracle123
7- Add second Certificate to Wallet
orapki wallet add -wallet C:\oracle\db_home\wallet\https_wallet -cert C:\oracle\db_home\wallet\https_wallet\DigiCertGlobalRootCA.crt -trusted_cert -pwd oracle123
8- test your webservice now !
No comments:
Post a Comment