Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issues with utl_https, Oracle Wallet and firewall

user11992646Mar 5 2010 — edited Mar 18 2010
Hello Everyone,
We are experimenting with Oracle wallet and utl_http and are attempting to do an https transfer, but we are facing some problems. I will appreciate your help greatly if you can advise on what could be wrong. We are on db version 10.2.0.1 and Unix HP-UX and are operating from within a firewall. The intention is to ping an https url and get a simple 200 response. Future development would include get/post XML documents from that url and other interesting stuff. I understand that utl_http with Oracle wallet can be used for this purpose.

The wallet has been created and the ewallet.p12 exists. We downloaded the SSL certificate from the url's website and uploaded into the wallet. Everything works if I put in a url with plain http but then things don't work with an HTTP*S* url. Is something called HTTPS TUNNELLING required because we have a firewall? I have no idea what this is or how it can be done.
I tried https with an internal urls within the firewall. But again, no luck. - So probably not just a firewall issue.
With HTTPS when I run the below code I get the following error with internal or external https sites. Again, greatly appreciate your time and help because this is the first time we are using Oracle wallet manager and do not know where to go from here.

ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1029
ORA-29268: HTTP client error

declare
url varchar2(225);
req utl_http.req;
resp utl_http.resp;
my_proxy BOOLEAN;
name varchar2(2000);
value varchar2(2000);
V_proxy VARCHAR2(2000);
v_n_proxy varchar2(2000);
v_msg varchar2(100);
v_len PLS_INTEGER := 1000;
BEGIN
-- Turn off checking of status code.
utl_http.set_response_error_check(FALSE);
--Set proxy server
utl_http.set_proxy('my-proxy');
utl_http.set_wallet('file:<full Unix path to the wallet on DB server>','wallet998');
req := utl_http.begin_request('https://service.ariba.com/service/transaction/cxml.asp');
--Set proxy authentication
utl_http.set_authentication(req, 'myproxyid', 'myproxypswd','Basic',TRUE); -- Use HTTP Basic

resp := utl_http.get_response(req);

FOR i IN 1..utl_http.get_header_count(resp) LOOP
utl_http.get_header(resp, i, name, value);
dbms_output.put_line(name || ': ' || value);
END LOOP;
utl_http.end_response(resp);
exception
when others then
dbms_output.put_line(sqlerrm);
END;
This post has been answered by Billy Verreynne on Mar 18 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2010
Added on Mar 5 2010
15 comments
6,007 views