How to call stored procedure from Mule 3.5 with new Database endpoint

这一生的挚爱 提交于 2019-12-05 08:34:29

IMO the best documentation for anything are its tests. The stored procedure tests for the DB module are here: https://github.com/mulesoft/mule/tree/mule-3.5.0/modules/db/src/test/resources/integration/storedprocedure

Based on these, the following should work:

<db:stored-procedure config-ref="Generic_Database_Configuration">
  <db:parameterized-query>{ call sp_retrieveData(:Id) }</db:parameterized-query>
  <db:in-param name="Id" value="58" />
</db:stored-procedure>

(I haven't tested it though)

Sashidhar Rao

Sample Stored procedure call:

<db:stored-procedure config-ref="Oracle_Configuration1" doc:name="Database">
    <db:parameterized-query><![CDATA[
    {
      call apps.create_sales_Order(:p_header_rec_oper, :P_order_number, :P_ordered_date, :P_line_id, :p_flow_Status_code, :P_return_status)
    }
    ]]>
    </db:parameterized-query>
    <db:in-param name="p_header_rec_oper" value="CREATE"/>
    <db:out-param name="P_order_number" type="INTEGER"/>
    <db:out-param name="P_ordered_date" type="DATE"/>
    <db:out-param name="P_line_id" type="VARCHAR"/>
    <db:out-param name="p_flow_Status_code" type="VARCHAR"/>
    <db:out-param name="P_return_status" type="VARCHAR"/>
</db:stored-procedure>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!