Remember to use the Utl_http method to invoke an interface, to report a character or value error

Source: Internet
Author: User

Background: EBS systems and other systems use the log method to log logs through the UTL_HTTP packet invocation interface.

A call to an interface that executes an error in the record log line to the report character or value.

Find the reason and find that the P_STR is longer than the limit of 32747.

Workaround:

PROCEDURE Log VARCHAR2  is  BEGIN     fnd_file.put_line (fnd_file. Log , p_str);    Dbms_output.put_line (P_STR);   END;
--resolves overflow problem with l_messge_clob length exceeding 3276, character or value error forIinch 0.. Trunc ((Dbms_lob.getlength (L_MESSGE_CLOB)- 1)/l_step) LOOPLog(Dbms_lob.substr (L_messge_clob, L_step, I*L_step+ 1));ENDLOOP;--the same utl_http.write_text length cannot exceed 32767,BufferVARCHAR2( -); offset Number:= 1; Amount Number:= 1024x768;--resolves overflow problem with l_messge_clob length exceeding 3276, character or value error---utl_http.write_text (L_req, p_content); while(offset<v_req_length) LOOP Dbms_lob.Read(p_content, amount, offset, buffer); Utl_http.write_text (R=L_req, data=buffer); Offset:=Offset+amount;ENDLOOP;

Reference:

Utl_http request and Response stops when > 32k

Uttl_http to POST CLOB request

http://www.orafaq.com/forum/t/202946/

Remember to use the Utl_http method to invoke an interface, to report a character or value error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.