Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2004
Added on Apr 30 2004
3 comments
436 views