Skip to Main Content

Oracle Database Discussions

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!

ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP"

Babar_BaigOct 27 2017 — edited Nov 8 2017

Hi,

I am facing the following error (check attached snap) while making an HTTP request to access www.oracle.com through UTL_HTTP. I am using the following code.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Declare

REQ UTL_HTTP.req;

res UTL_HTTP.resp;

p_url VARCHAR2(4000) := 'http://www.oracle.com';

p_email_id varchar2(100);

p_password varchar2(100);

p_usertype varchar2(100);

name varchar2(4000);

buffer varchar2(4000);

my_scheme VARCHAR2(256);

my_realm VARCHAR2(256);

my_proxy BOOLEAN;

BEGIN

-- Make a HTTP request and get the response.

-- utl_http.(p_url);

req := utl_http.begin_request(p_url, 'GET');

res := UTL_HTTP.GET_RESPONSE(req);

IF (res.status_code = UTL_HTTP.HTTP_UNAUTHORIZED) THEN

UTL\_HTTP.GET\_AUTHENTICATION(res, my\_scheme, my\_realm, my\_proxy);

IF (my\_proxy) THEN

  DBMS\_OUTPUT.PUT\_LINE('Web proxy server is protected.');

  DBMS\_OUTPUT.PUT('Please supplied the required ' || my\_scheme ||

                  ' authentication username/password for realm ' ||

                  my\_realm || ' for the proxy server.');

ELSE

  DBMS\_OUTPUT.PUT\_LINE('Web page ' || p\_url || ' is protected.');

  DBMS\_OUTPUT.PUT('Please supplied the required ' || my\_scheme ||

                  ' authentication username/password for realm ' ||

                  my\_realm || ' for the Web page.');

END IF;

UTL\_HTTP.END\_RESPONSE(res);

RETURN;

END IF;

begin

loop

  utl\_http.read\_line(res, buffer);

  dbms\_output.put\_line(buffer);

end loop;

utl\_http.end\_response(res);

exception

when utl\_http.end\_of\_body then

  utl\_http.end\_response(res);

end;

END;

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Database details

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

Error.jpg

Please help

Regards

Babar

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 5 2017
Added on Oct 27 2017
12 comments
7,807 views