2 Replies Latest reply: Nov 15, 2012 11:35 AM by vlethakula RSS

    problem when using utl.http package

    840254
      hello,as subject above,i have a problem with that package
      set serveroutput on

      DECLARE
      req   utl_http.req;
      resp  utl_http.resp;
      value VARCHAR2(32000);
      BEGIN
      req := utl_http.begin_request('http://www.psoug.org');
      resp := utl_http.get_response(req);

      value := utl_http.request('http://www.psoug.org/');
      dbms_output.put_line(value);

      utl_http.end_response(resp);
      EXCEPTION
      WHEN utl_http.end_of_body THEN
      utl_http.end_response(resp);
      END;

      i tried to create ACL

      BEGIN
      DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl         => 'www.xml',
      description => 'WWW ACL',
      principal   => 'SYSTEM',
      is_grant    => true,
      privilege   => 'connect');

      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl       => 'www.xml',
      principal => 'SYSTEM',
      is_grant  => true,
      privilege => 'resolve');

      DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl  => 'www.xml',
      host => '127.0.0.1');
      END;
      */*
      COMMIT;

      but it still show error

      Error report:
      ORA-29273: HTTP request failed
      ORA-06512: at "SYS.UTL_HTTP", line 1722
      ORA-29270: too many open HTTP requests
      ORA-06512: at line 9
      *29273. 00000 - "HTTP request failed"*
      **Cause: The UTL_HTTP package failed to execute the HTTP request.*
      **Action: Use get_detailed_sqlerrm to check the detailed error message.*
      Fix the error and retry the HTTP request.


      Thank