Home » Developer & Programmer » JDeveloper, Java & XML » How to pass XMLData type as parameter to Stored procedure from JAVA
How to pass XMLData type as parameter to Stored procedure from JAVA [message #91956] Tue, 09 December 2003 10:09 Go to next message
MK
Messages: 31
Registered: June 2001
Member
We are using Oracle 9i rel 2 .
I have a relational table with xmldata type as a column.
CREATE TABLE proposal (
PROPOSAL_ID NUMBER NOT NULL,
PROPOSAL_DOCUMENT XMLTYPE NOT NULL,
CONSTRAINT PK_proposal_id
PRIMARY KEY ( PROPOSAL_ID ) ) ;

We are not using XMLDB. XML document is validated in JAVA.
Table entries are created from Java using a stored procedure which accepts proposal_document as xml data type parameter.
CREATE OR REPLACE PROCEDURE AP_PROC_STORE_XML_DOCS1( xmldata IN SYS.XMLType , status out varchar2) IS
BEGIN
INSERT INTO proposal (proposal_id, proposal_documentl)
VALUES (seq_proposal_id.nextval,xmldata );
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('exception for others is ' || SUBSTR(SQLERRM(SQLCODE),1,50)) ;
raise;
status := 'N' ;
END;

Question : HOW TO PASS xmldata as an XMLdata type parameter for the stored procedure in JAVA.

Any help appreciated .

Thanks in advance.
MK
Re: How to pass XMLData type as parameter to Stored procedure from JAVA [message #92016 is a reply to message #91956] Fri, 30 January 2004 07:31 Go to previous message
RJ McCarthy
Messages: 1
Registered: January 2004
Junior Member
Hi MK,

Curious if you figured out how to do this. I'm trying to the same but have not yet found a clean way to handle this. Would appreciate any tips if you've figured this out. Thanks. Cheers - RJMc
Previous Topic: BC4J ApplicationModule
Next Topic: How can I pass JavaObject in Stored procedure
Goto Forum:
  


Current Time: Tue Apr 16 16:31:18 CDT 2024