goaway1234
Programmer
I have a web application where a web service written in C# coordinates communication between an Oracle 9i release 2 database and the rest of the application. In a method that is used to call store procedures, I am trying to add the ability to create xmltype input parameters.
Everything works as expected until the procedure is actually executed. When I call OracleCommand.ExecuteNonQuery, the procedure being called always errors out with "PLS-00707: unsupported construct or internal error [2603]".
Called Procedure is:
C# code is:
I've left out sections of code for brevity's sake, but I assure you that when ExecuteNonQuery() is called, the command has all of the necessary parameters, and the connection is open and works for other procedures and queries. Also, this procedure works if you eliminate the input parameter; it will retrieve xmltype output parameters just fine. The xml document I am attempting to pass is simply: <testing>Hello World</testing>
All of the documentation and online code samples I can find indicate that I am creating everything correctly. The exact same code works with a 10g database.
Can anybody provide any insight as to what is happening?
Everything works as expected until the procedure is actually executed. When I call OracleCommand.ExecuteNonQuery, the procedure being called always errors out with "PLS-00707: unsupported construct or internal error [2603]".
Called Procedure is:
Code:
create or replace procedure test_xml_params(p_xdoc in xmltype, p_result out xmltype) is
i integer;
begin
insert into test_xml_tab values (p_xdoc);
p_result := p_xdoc;
end;
Code:
XmlDocument request;
string xpath;
XmlNode pnode;
XmlDocument pdoc;
OracleXmlType pval
OracleParameter p;
OracleConnection dbCon;
OracleCommand cmd;
pnode = request.SelectSingleNode(xpath);
pdoc = new XmlDocument();
pdoc.AppendChild(pdoc.ImportNode(pnode, true));
pval = new OracleXmlType(dbCon, pdoc);
p = new OracleParameter(key, OracleDbType.XmlType, pval,
ParameterDirection.Input);
OracleCommand cmd = new OracleCommand("test_xml_params", dbCon);
cmd.CommandType = CommandType.StoredProcedure;
cmd.BindByName = true;
...
cmd.ExecuteNonQuery();
I've left out sections of code for brevity's sake, but I assure you that when ExecuteNonQuery() is called, the command has all of the necessary parameters, and the connection is open and works for other procedures and queries. Also, this procedure works if you eliminate the input parameter; it will retrieve xmltype output parameters just fine. The xml document I am attempting to pass is simply: <testing>Hello World</testing>
All of the documentation and online code samples I can find indicate that I am creating everything correctly. The exact same code works with a 10g database.
Can anybody provide any insight as to what is happening?