-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
9.2
-
None
The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":
BEGIN SELECT XMLELEMENT(NAME elems, XMLATTRIBUTES(ss4_view.stockRestProc.pk_stockid_in AS pk_stockid_in), XMLAGG(XMLELEMENT(NAME elem, XMLFOREST(ss4_view.stock.stockid, ss4_view.stock.exchangeid, ss4_view.stock.ticker, ss4_view.stock.name, ss4_view.stock.description, ss4_view.stock.notes)))) AS xml_out FROM ss4_view.stock WHERE ss4_view.stockRestProc.pk_stockid_in = ss4_view.stock.stockid; END
The resulting REST service (../json/stock/
{stockid}) produces the expected results and appears fine. However, executing the following in a sql script connected to the same teiid server via jdbc produces an exception:
SELECT XMLELEMENT(NAME elems , XMLAGG(XMLELEMENT(NAME elem, XMLFOREST(ss4_view.stock.stockid , ss4_view.stock.exchangeid , ss4_view.stock.ticker , ss4_view.stock.name , ss4_view.stock.description , ss4_view.stock.notes) ) ) ) AS xml_out FROM ss4_view.stock WHERE 4 = ss4_view.stock.stockid;
org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException