I am trying to expose an Oracle Table as a web service using XML DB Service. I want to return multiple rows of table based on where condition passed in the Request of the web service.
Following -: native-oracle-xml-db-web-services-11gr1
A procedure is developed which takes PK column as input, and returns column as output. It works when return is column by column. But when I try to return the complete row as type, it is not working.
This is working.
URL of webservice -: http://domain:8080/orawsv/TEST/GET_TEST_TAB?wsdl
create or replace PROCEDURE GET_TEST_TAB (
p_id IN test_tab.id%TYPE,
p_description OUT test_tab.description%type) AS
BEGIN
SELECT description into p_description FROM test_tab
WHERE id = p_id;
END GET_TEST_TAB;
Now I want to return the multiple rows of TEST_TAB table, without hard coding the column name.
I have modified the procedure as
Passing Input -:
Getting Output -:
Problem is -:
a) I have manually added each column in the procedure. If any new column is added, procedure needs to be modified
b) XMLTABLE output column type has to be hard coded. Unable to define column as TABLE_NAME.COLUM_NAME%TYPE