How to call an Oracle procedure w/ OUT parameter in WSO2ESB?

送分小仙女□ 提交于 2020-01-07 05:49:06

问题


versions: - WSO2 4.6.0 - Oracle 11g

I Have this procedure in an Oracle DB:

   PROCEDURE SEARCHCONTRACT ( CONTRACTNUM IN     OKC_K_HEADERS_B.CONTRACT_NUMBER%TYPE
                                 , cur_out          IN OUT RefCursor) 
   ....

The procedure is working fine!

Note that cur_out IN OUT RefCursor!

I have no clue on how to handle that parameter in a DBLookup mediator! This mediator does not have any place to inform whether each parameter is "IN" or "OUT" and I'm not sure if setting the direction (IN/OUT) would be enough.

Thanks in advance for any help!


回答1:


I believe you can use WSO2 Data Services Server (DSS) or your requirement.

You can download WSO2 DSS from http://wso2.com/products/data-services-server/

It has support for Oracle RefCursor.

You can then use the data service via WSO2 ESB.

Following article might help.

http://wso2.com/library/tutorials/use-oracle-ref-cursors-wso2-data-services-server




回答2:


just a thought. You could try to implement a pl/sql function that call that prodecure and return the value. This way you could get the result with the ddl SELECT MyfUCNTION(PARAM1) FROM DUAL.

You could also convert the procedure into a function.

Hope it helps!



来源:https://stackoverflow.com/questions/17326746/how-to-call-an-oracle-procedure-w-out-parameter-in-wso2esb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!