Kamlesh Dhairyavan
Kamlesh Dhairyavan

Reputation: 7

Oracle ORDS Data Service PL/SQL Procedure cannot return more than 32767 Characters to CLOB Out parameter called from Python or Postman

  1. ORDS.DEFINE_HANDLER(
  2.  p_module_name    => 'EMRPRJWSTV1.0',
    
  3.  p_pattern        => 'getPriceConfigDetails',
    
  4.  p_method         => 'GET',
    
  5.  p_source_type    => 'plsql/block',
    
  6.  p_mimes_allowed  => NULL,
    
  7.  p_comments       => NULL,
    
  8.  p_source         => 
    

9.'DECLARE 10. o_json_clob CLOB; 11. v_appname VARCHAR2(1000); 15.BEGIN 16. apps.XXOM_PRJWS_API_PKG.get_price_config_details(i_json_clob => :body_text, o_json_clob => o_json_clob);

  1. CREATE OR REPLACE PACKAGE BODY APPS.xxom_prjws_api_pkg 20.is
  2. PROCEDURE get_price_config_details(i_json_clob CLOB,
  3.                                   o_json_clob   OUT CLOB)
    
  4. is 24.dbms_lob.append(o_json_clob,to_clob('"item_type_code":"'|| l_line_rec_tbl(j).item_type_code||'",'));
    25.dbms_lob.append(o_json_clob,to_clob('"line_number":"'|| l_line_rec_tbl(j).line_number||'",'));

I am calling above procedure from Python/Postman to get the value of o_json_clob, when the size is less than or equal to around 32767 then it is working fine but when size of o_json_clob is going more than 32767 then PL/SQL Procedure throws an error.

However same procedure works fine when called from Oracle SQL Developer. So how do I get value of this clob variable if the size is more than 32767 characters.

Upvotes: 1

Views: 152

Answers (0)

Related Questions