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!

Error while executing using utl_http

1567114Jun 25 2017 — edited Jul 7 2017

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>

This post has been answered by Billy Verreynne on Jun 26 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2017
Added on Jun 25 2017
21 comments
981 views