LOOP --- SOME CODE UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml'); UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(var)); UTL_HTTP.set_header(l_http_request, 'SOAPAction', 'http://SOMEURL'); -- I print the length of v_var, it is 32909 bytes -- getting ORA-06502: PL/SQL: numeric or value error here UTL_HTTP.write_text(l_http_request, var); SOME CODE END LOOP;
user650888 wrote:And why did you expect it to work? Did you read UTL_HTTP.write_text documentation? Second parameter is defined as:
I have declared var as CLOB, and expected the below UTL_HTTP.write_text(l_http_request, var) to work
data IN <font size=3 color=red>VARCHAR2</font> CHARACTER SET ANY_CSSY.
user650888 wrote:It doesn't matter how it is declared in your code. When you pass it to UTL_HTTP.write_text it expects a VARCHAR2 and therefore variable of any other type is automatically implicitly converted to VARCHAR2. And since VARCHAR2 in PL/SQL is limited to 32767 you get an error.
but var is declared as CLOB