Plsql ORA-29273:HTTP请求失败,ORA-29270:打开的HTTP请求太多

Plsql ORA-29273:HTTP请求失败,ORA-29270:打开的HTTP请求太多,plsql,Plsql,让我们知道上述过程中的问题是什么,以及如何处理所有请求连接都应该关闭。您如何确保我们不会发生此问题?如果出现任何异常,请始终使用utl_http.end_响应关闭打开的连接 Error desc:ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-29270: too many open HTTP requests http\u-req:=utl\u-http.begin\u请求(t\u-url,

让我们知道上述过程中的问题是什么,以及如何处理所有请求连接都应该关闭。您如何确保我们不会发生此问题?如果出现任何异常,请始终使用utl_http.end_响应关闭打开的连接

Error desc:ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-29270: too many open HTTP requests
http\u-req:=utl\u-http.begin\u请求(t\u-url,'POST',utl\u-http.http\u-version\u-1);
utl_http.set_头(http_请求,“内容类型”,t_内容类型);
utl_http.set_头(http_请求,“内容长度”,长度(soap_请求));
utl_http.set_头(http_请求,'SOAPAction','http://tempuri.org/IService/GetActive');
utl_http.write_text(http_请求、soap_请求);
http_resp:=utl_http.get_响应(http_请求);
Utl_Http.read_text(Http_resp,response_env,32767);
dbms_lob.createtemporary(x_clob,false);
bms_lob.OPEN(x_clob,dbms_lob.lob_readwrite);
开始
循环utl_http.read_文本(http_resp,l_缓冲区);
dbms_lob.writeappend(x_clob,length(l_buffer),l_buffer);
端环;
例外情况
当其他人
如果sqlcode为-29266,则
提高;
ENDIF;
结束;
如果(http_resp.status_code=200),则
L_RESP_XML:=xmltype(response_env);
L_RESULTCODE:=L_resp_xml.extract('/s:Envelope/s:Body/GetResponse/GetResult/a:resultader/b:RESULTCODE/text()','xmlns='http://tempuri.org/“xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/ xmlns:a=”http://schemas.datacontract.org/2004/07/“xmlns:b=”http://schemas.datacontract.org/2004/07/“')。getstringval();
L_RESULTDESCRIPTION:=L_resp_xml.extract('/s:Envelope/s:Body/GetResponse/GetResult/a:resultateder/b:RESULTDESCRIPTION/text()','xmlns='http://tempuri.org/“xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/ xmlns:a=”http://schemas.datacontract.org/2004/07/“xmlns:b=”http://schemas.datacontract.org/2004/07/.CRM“')。getstringval()
如果(l_resultcode='0'和l_resultdescription='Successful'),则
idc\u ir\u xml\u处理(响应环境、错误代码、错误消息);
如果(错误代码'00'),则
错误代码:=错误代码;错误描述:=错误描述;提出误差补偿;
其他的
错误代码:='00T';
错误描述:=l\U结果描述;提出错误
ENDIF;
ENDIF;
utl_http.end_响应(http_resp);
错误代码:='00';
错误描述:=“成功”;
例外情况
那你什么时候出来
utl_http.end_响应(http_resp);
错误代码:=错误代码;错误描述:=错误描述---SQLERRM | |“未处理的异常”;
当其他人
utl_http.end_响应(http_resp);
错误代码:='91';错误描述:=sqlerrm | |“未处理的异常”;
dbms_output.put_line('Error desc:'| | Error_desc);
结束;
Error desc:ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-29270: too many open HTTP requests
http_req := utl_http.begin_request(t_url,'POST', utl_http.http_version_1_1);
utl_http.set_header(http_req, 'Content-Type', t_content_type);
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
utl_http.set_header(http_req, 'SOAPAction', 'http://tempuri.org/IService/GetActive');
utl_http.write_text(http_req, soap_request);
http_resp := utl_http.get_response(http_req);
Utl_Http.read_text(http_resp, response_env,32767);
dbms_lob.createtemporary(x_clob, false );
bms_lob.OPEN( x_clob, dbms_lob.lob_readwrite );
BEGIN
  loop utl_http.read_text(http_resp, l_buffer); 
    dbms_lob.writeappend(x_clob, length(l_buffer) , l_buffer); 
  end LOOP;
EXCEPTION 
WHEN others THEN
  IF sqlcode <> -29266 then 
     raise;
  ENDIF;
END;
IF(http_resp.status_code = 200) then 
L_RESP_XML:= xmltype(response_env);

L_RESULTCODE:= l_resp_xml.extract('/s:Envelope/s:Body/GetResponse/GetResult/a:ResultHeader/b:ResultCode/text()', 'xmlns="http://tempuri.org/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/ xmlns:a="http://schemas.datacontract.org/2004/07/" xmlns:b="http://schemas.datacontract.org/2004/07/"').getstringval();
L_RESULTDESCRIPTION:= l_resp_xml.extract('/s:Envelope/s:Body/GetResponse/GetResult/a:ResultHeader/b:ResultDescription/text()', 'xmlns="http://tempuri.org/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/ xmlns:a="http://schemas.datacontract.org/2004/07/" xmlns:b="http://schemas.datacontract.org/2004/07/.CRM"').getstringval()

IF (l_resultcode = '0' AND l_resultdescription = 'Successful') then 
    siebel.idc_ir_xml_processing(response_env, err_code , err_mesg);
    IF (err_code <> '00') then 
        error_code := err_code;error_desc := err_mesg;raise error_out;
    ELSE
      error_code := '00T';
      error_desc := l_resultdescription;raise error_out
    ENDIF;
 ENDIF;

utl_http.end_response(http_resp);
error_code := '00';
error_desc := 'SUCCESS';
EXCEPTION
   WHEN error_out THEN
      utl_http.end_response(http_resp); 
      error_code := error_code;error_desc := error_desc; ---SQLERRM||' Unhandled Exception';
    WHEN others THEN 
      utl_http.end_response(http_resp); 
      error_code := '91';error_desc := sqlerrm || ' Unhandled Exception';
     dbms_output.put_line('Error desc:' || error_desc );

END;