DECLARE
req utl_http.req;
resp utl_http.resp;
value VARCHAR2(1024);
g_wallet_loc VARCHAR2 (100) := FND_PROFILE.VALUE ('XX_GLOBAL_WALLET');
g_wallet_pwd VARCHAR2 (100) := FND_PROFILE.VALUE ('XX_GLOBAL_WALLET_PWD');
g_proxy_server VARCHAR2 (200) := FND_PROFILE.VALUE ('XX_WEB_PROXY_SERVER');
BEGIN
dbms_output.enable(40000);
UTL_HTTP.set_proxy (g_proxy_server);
UTL_HTTP.set_wallet (g_wallet_loc, g_wallet_pwd);
req := utl_http.begin_request('http://www.google.com');
UTL_HTTP.set_header (req, 'Content-Type', 'application/x-www-form-urlencoded');
resp := utl_http.get_response(req);
LOOP
utl_http.read_line(resp, value, TRUE);
dbms_output.put_line(value);
END LOOP;
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(resp);
END;
When executing I am getting the below Error:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access http://www.google.com/
on this server.</p>
</body></html>