Andrej Šmigala created TEIIDDES-2698:
----------------------------------------
Summary: REST procedure in genrated dynamic VDB does not work
Key: TEIIDDES-2698
URL:
https://issues.jboss.org/browse/TEIIDDES-2698
Project: Teiid Designer
Issue Type: Bug
Components: VDB & Execution
Affects Versions: 9.0.4
Reporter: Andrej Šmigala
Attachments: DynamicProcedureProject.zip
When a VDB containing view model with a REST procedure is exported as a dynamic VDB, the
resulting autogenrated WAR does not work. This is because the generated DDL does not
contain the OPTIONS clause with REST properties, not does it contain the required SET
NAMESPACE statement
Generated DDL:
{code:sql}
CREATE VIRTUAL PROCEDURE testProc (p1 string(4000))
AS
BEGIN
SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1,
'elem2' AS elem2)) AS xml_out;
END;
{code}
Expected DDL (note that this also incorporates TEIIDDES-2697):
{code:sql}
SET NAMESPACE 'http://teiid.org/rest' AS REST;
CREATE VIRTUAL PROCEDURE testProc (p1 string(4000)) RETURNS TABLE (xml_out xml) OPTIONS
("REST:METHOD" 'GET', "REST:URI" 'test/{p1}')
AS
BEGIN
SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1,
'elem2' AS elem2)) AS xml_out;
END;
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)