Hi,
I have a Oracle stored procedure written in 11g which takes xml as i/p
create or replace
PROCEDURE "XDATA"
(
inXDATA IN SYS.XMLTYPE,
outStatus OUT varchar2)
AS
BEGIN
INSERT INTO SPZN.testXML(XDATA) VALUES(inXDATA);
COMMIT;
EXCEPTION WHEN OTHERS THEN
outStatus := SUBSTR(SQLERRM, 1, 200);
END XDATA;
}
Iam trying to pass xml data using the below code to set xml and declare xml
inParams.put("inXDATA",
new SqlTypeValue() {
@Override
public void setTypeValue(PreparedStatement arg0, int arg1,
int arg2, String arg3) throws SQLException {
// TODO Auto-generated method stub
((OracleCallableStatement )arg0).setObject(1, new XMLType(arg0.getConnection(), "<product>prospects</product>"));
}
});
//execution of stored procedure
outParams = execute(inParams);
declareParameter(new SqlParameter("inXDATA",Types.OTHER));
Iam getting the following exception when i execute
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection incompatible with oracle.jdbc.OracleConnection
Please suggest and advise on how to procede with xml insertion. Any help in this regard will be greatly appreciated.
Thanks,
Raghuram.
I have a Oracle stored procedure written in 11g which takes xml as i/p
create or replace
PROCEDURE "XDATA"
(
inXDATA IN SYS.XMLTYPE,
outStatus OUT varchar2)
AS
BEGIN
INSERT INTO SPZN.testXML(XDATA) VALUES(inXDATA);
COMMIT;
EXCEPTION WHEN OTHERS THEN
outStatus := SUBSTR(SQLERRM, 1, 200);
END XDATA;
}
Iam trying to pass xml data using the below code to set xml and declare xml
inParams.put("inXDATA",
new SqlTypeValue() {
@Override
public void setTypeValue(PreparedStatement arg0, int arg1,
int arg2, String arg3) throws SQLException {
// TODO Auto-generated method stub
((OracleCallableStatement )arg0).setObject(1, new XMLType(arg0.getConnection(), "<product>prospects</product>"));
}
});
//execution of stored procedure
outParams = execute(inParams);
declareParameter(new SqlParameter("inXDATA",Types.OTHER));
Iam getting the following exception when i execute
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection incompatible with oracle.jdbc.OracleConnection
Please suggest and advise on how to procede with xml insertion. Any help in this regard will be greatly appreciated.
Thanks,
Raghuram.