I am using Mule CE 3.6.1. I have the following Database connector configuration calling an Oracle stored procedure.
<db:stored-procedure config-ref="Oracle_Configuration" doc:name="Database">
<db:parameterized-query><![CDATA[call get_phone_email(:userId, :tPhoneRecord)]]></db:parameterized-query>
<db:in-param name="userId" type="NUMERIC" value="#[payload]" />
<db:out-param name="tPhoneRecord" type="ARRAY" />
</db:stored-procedure>
Parameter tPhoneRecord is defined as IS TABLE OF phone_email%ROWTYPE
(i.e. table of records) in the stored procedure. I have tried specifying the parameter type ARRAY
but get the error:
Message : Invalid argument(s) in call (java.sql.SQLException). Message payload is of type Object[]
Code : MULE_ERROR--2
I have also tried using other out-param types or not specifying a type without success.
Please let me know what out-param type I should use for an Oracle table of records, or if I should do this in Java instead. Many thanks in advance.
Copyright Notice:Content Author:「CLawson」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32012072/mule-invoking-an-oracle-stored-procedure-which-returns-a-table-of-custom-type