IBM Worklight - How to call a Stored Procedure wit

2019-07-30 06:46发布

We using a SQL adapter and I'm getting the below error while invoking the Stored Procedure. we Our database is Oracle 11g. Below is our adapter and procedures.

function deals(param) {
    return WL.Server.invokeSQLStoredProcedure({
        procedure : "deals_proc",
        parameters : []
    });
}

and the procedure is

create or replace procedure deals_proc(c1 out sys_refcursor ) AS 
begin 
open c1 for 
select CATEGORYNAME from DEALS;
end deals_proc;

and the error 'm getting is

{
   "errors": [
      "Runtime: Failed to retrieve data with procedure : deals_proc"
   ],
   "info": [
   ],
   "isSuccessful": false,
   "warnings": [
   ]
}

in console error message is

Failed to retrieve data with procedure : deals_proc
FWLSE0101E: Caused by:  [project Test]java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DEALS_PROC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
java.lang.RuntimeException: Failed to retrieve data with procedure : deals_proc

1条回答
放我归山
2楼-- · 2019-07-30 07:31

Worklight does not support the out parameter in SQL adapters. See this question: IBM Worklight - How to get OUT parameter when invoking a stored procedure?

The question I linked you to also contains an answer providing an elaborate workaround if you wish the try it (basically, override Worklight and implement it in Java code).

查看更多
登录 后发表回答