dla rozwiązania SQL:
select
XMLType.createxml(
package_name.storedProcName('PARAM1', 'PARAM2', 'PARAM3')
) as sresult
from dual;
to powinno uniknąć błędu konstruktora.
np.
SQL> select xmltype.createxml(mycur(0)) from dual;
XMLTYPE.CREATEXML(MYCUR(0))
-------------------------------------------------------------------------------
SQL> select xmltype(mycur(0)) from dual;
ERROR:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.XMLTYPE", line 334
ORA-06512: at line 1
no rows selected
x
SQL>