Hi I am facing issue while passing rec array as input parameter in ORDS exposed package procedure
Summary:
I am facing an issue and not sure about doing it correctly I created a package and created a record type and
CREATE OR REPLACE PACKAGE my_test_package AS TYPE t_row IS RECORD ( id NUMBER, description VARCHAR2(50) ); TYPE t_tab IS TABLE OF t_row INDEX BY BINARY_INTEGER; POUT EDURE proc1 (p_record_id in number, p_rows IN t_tab); END my_test_package; /
CREATE OR REPLACE PACKAGE BODY my_test_package AS PROCEDURE proc1 (p_record_id in number,p_rows IN t_tab) AS BEGIN for i in 1..p_row.count loop dbms_output.put_line(p_row(i).id ||p_row(i).description ||p_record_id ); end loop; END proc1; END my_test_package; / POST URL : curl --request POST \ --url http://localhost:8080/ords/hr/my_test_package/PROC1 \ --header 'content-type: application/json' \ --data ' { "p_record_id":"129", "p_rows":[ { "id":1, "description":"xxxxx" } ] }' After I enable the pkg proceudre as ords using below curl to run . Error: error="error"; error_description*=UTF-8''An%20unexpected%20error%20with%20the%20following%20message%20occurred%3a%20Unsupported%20data%20type%20 hr.my_test_package.p_row
Tagged:
0