最近要通过存储过程给web页面发送一个请求,网上看了下utl_http可以用,看了一下utl_http包中的例子如下:
DECLARE
    req   utl_http.req;
    resp  utl_http.resp;
    value VARCHAR2(1024);
  BEGIN    utl_http.set_proxy('proxy.it.my-company.com', 'my-company.com');    req := utl_http.begin_request('http://www-hr.corp.my-company.com');
    utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    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;
挪用下来运行了一下,直接死掉了,对这个很不懂,那位大侠帮忙一下,还有执行了一下select utl_http.request('http://www.google.com.hk/') from dual;有记录返回,但是换成我们自己开发的url(没有发布)就报如下错,这是为什么呐ORA-29273: HTTP 请求失败
ORA-06512: 在 "SYS.UTL_HTTP", line 1722
ORA-24247: 网络访问被访问控制列表 (ACL) 拒绝
ORA-06512: 在 line 1

解决方案 »

  1.   

    1 没事设置什么代理?2 contentType参数不全。3 你没有发布你指望它能访问到什么?
      

  2.   

    大侠,我找到问题了,我没有配置ACL,所以就死掉了,但是现在执行了一会就会报访问不到目标主机,我ping了一下域名,是通的,而且通过IE可以访问到网页,说名防火墙没有阻拦,这就不知道是为什么了。
      

  3.   

    怎么配置ACL啊?求具体解决方法