This seems to be a common problem and I have done it in the past but cannot for the life of me remember how I did it.
I have a simple stored procedure which does a select statement and needs to send me the resultset back. I've got a cursor set up and when I run it through the sqlplus it works just fine, but when I try to run my java against it I get a "PLS-00306: wrong number or types of arguments in call to 'PROCEDURE'" error.
Here are the snippets of my code, any help would be greatly appreciated.
CREATE OR REPLACE PACKAGE Types IS
TYPE cursor_type IS REF CURSOR;
END Types; /
CREATE OR REPLACE PACKAGE Security AS
PROCEDURE thisProcedure(as_ssn IN VARCHAR2, test OUT Types.cursor_type);
END Security; /
CREATE OR REPLACE PACKAGE BODY Security AS
PROCEDURE thisProcedure ( as_ssn IN VARCHAR2, c1 OUT Types.cursor_type ) IS
OPEN c1 FOR SELECT * FROM GROUPID WHERE SSN = as_ssn; END thisProcedure;