Skip to Main Content

DevOps, CI/CD and Automation

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!

utl_http.read_text hung up

jtemeMar 22 2012 — edited Mar 23 2012
I have the following request for a web services from within a pl/sql procedure:
My problem is, the response is too big and the procedures hung up in the line of the instruction utl_http.read_text (see below).
I wrote a log file within the loop and it loops several times and then hung up.

there would be another way to do it?... I have Oracle 11gR2.

Thanks..!!!


-- Initialize the CLOB.
DBMS_LOB.createtemporary (l_clob, FALSE);
DBMS_LOB.createtemporary (vxml_enviado, FALSE);
DBMS_LOB.createtemporary (vxml_recibido, FALSE);

UTL_HTTP.set_response_error_check (TRUE);
UTL_HTTP.set_response_error_check (TRUE);
UTL_HTTP.set_detailed_excp_support (TRUE);
UTL_HTTP.set_cookie_support (TRUE);
UTL_HTTP.set_transfer_timeout (120);
UTL_HTTP.set_follow_redirect (3);
UTL_HTTP.set_persistent_conn_support (TRUE);

req :=
UTL_HTTP.begin_request (
'http://oasdes-lnx.sis.personal.net.py:7782/AppWS-WSEvaluarReglaCondicionComercial-context-root/WSEvaluarReglaCondicionComercialSoapHttpPort',
'POST',
'HTTP/1.1');

xml := 'some xml not too big'

UTL_HTTP.set_header (req, 'Content-Type', 'text/xml');
UTL_HTTP.set_header (req, 'Content-Length', LENGTH (xml));
UTL_HTTP.set_header (req,
'SOAPAction',
'"http://wsevaluarreglacondicioncomercial/"');

UTL_HTTP.write_text (req, xml);
resp := UTL_HTTP.get_response (req);
BEGIN
LOOP
UTL_HTTP.read_text (resp, respval);
DBMS_LOB.writeappend (l_clob, LENGTH (respval), respval);
END LOOP;
UTL_HTTP.end_response (resp);
EXCEPTION
WHEN UTL_HTTP.end_of_body
THEN
printlg ('UTL_HTTP.end_of_body ', vlogfile);
UTL_HTTP.end_response (resp);
END;

Edited by: user13058213 on 22-mar-2012 13:44
This post has been answered by Jason_(A_Non) on Mar 22 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2012
Added on Mar 22 2012
4 comments
930 views