Oracle Security is easier if you design for it
View Profile | WWW | Email
« on: Sep 25th, 2005, 6:06am »
Quote | Modify
1. DBURITYPE constructor takes two arguments URL:VARCHAR2 and
SPARE:RAW. Does anybody know what's the use of the second argument,
SPARE? Documentation seems to be completely silent about it.
2. DBUri Servlet allows you to extract more than one row from a table
by using rowsettag
With DBURITYPE the documentation says: "A DBUri must identify exactly a
single data value, either an object type or a collection. If the data
value is an entire row, you indicate that by including a ROW node. The
DBUri can also point to an entire table."
If you try using DBURITYPE to return more than one row (except for when
returning a full table) you'll get this error message: ORA-19003:
Missing XML root element name.
1. SELECT DBURITYPE('/SCOTT/EMP/ROW[EMPNO=7934]').GETXML() FROM DUAL;
OK, XPath refers a single row.
2. SELECT DBURITYPE('/SCOTT/EMP').GETXML() FROM DUAL;
OK, returns the whole table
3. SELECT DBURITYPE('/SCOTT/EMP/ROW[DEPTNO=30]').GETXML() FROM DUAL;
ORA-19003: Missing XML root element name
ORA-06512: at "SYS.DBURITYPE", line 21
ORA-06512: at "SYS.DBURITYPE", line 31
ORA-06512: at line 1
Is there a way to make DBURITYPE return more than one row? Could SPARE
argument play a role in this?
This behavior doesn't seem to make any sense to me. It's OK to have
DBUri Servlet return more than one row but with DBURITYPE you have to
give a path that either returns the whole table or exactly a single row.