Passing array of Types to java class
240130Apr 30 2004 — edited May 4 2004
I am trying to pass a user defined type (that is an array) from PL/Sql to a javaclass. Here are the definitions that make-up the parameter to pass from PL/Sql to Java (uri_digest_array):
CREATE OR REPLACE TYPE uri_digest as object (uri VARCHAR2(256),
digest_value CLOB);
CREATE OR REPLACE TYPE uri_digest_array AS VARRAY(10) OF uri_digest;
In Oracle-land, java classes are published to PL/Sql by way of the following definition. Note that the intent here is to have compatible data-types.
CREATE OR REPLACE FUNCTION SIGNRETURNINGXML (p_array IN uri_digest_array)
RETURN LONG
AS LANGUAGE JAVA
NAME 'SignReturningXml.main(oracle.sql.Array) return java.lang.String';
Here is a fragment of the java class code:
class SignReturningXml {
public static String main(String [] [] signItems ) // I have no idea what datatype to use here!
{ . . . . The code in here would process the passed array normally from first entry to last.
Currently I get the following error:
PLS-00311: the declaration of
"SignReturningXml.main(oracle.sql.Array) return
java.lang.String" is incomplete or malformed
I could use some suggestions on resolving the datatype conflicts. Any ideas? Has anyone tried this kind of thing?
Thanks,
Michael