Bug 1273841 - REST procedure in generated dynamic VDB does not work
REST procedure in generated dynamic VDB does not work
Status: CLOSED NOTABUG
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Tooling (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Barry LaFond
Andrej Smigala
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-21 07:34 EDT by Andrej Smigala
Modified: 2016-07-25 11:43 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 08:29:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker TEIIDDES-2698 Major Closed REST procedure in generated dynamic VDB does not work 2016-07-25 11:43 EDT

  None (edit)
Description Andrej Smigala 2015-10-21 07:34:19 EDT
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:

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;



Expected DDL (note that this also incorporates TEIIDDES-2697):

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;

Steps to Reproduce:
# import the attached project
# generate a dynamic VDB from DynamicProcedureVdb
# deploy and execute the dynamic vdb
# go to {{http://localhost:8080/dynamicprocedurevdb_1/proceduremodel/test/a}} in the browser, returns 500
Comment 2 Barry LaFond 2015-12-07 08:29:19 EST
Using only JIRA now.  Marking as closed
Comment 3 JBoss JIRA Server 2016-03-01 09:47:41 EST
Matus Makovy <mmakovy@redhat.com> updated the status of jira TEIIDDES-2698 to Reopened
Comment 4 JBoss JIRA Server 2016-03-02 06:47:59 EST
Matus Makovy <mmakovy@redhat.com> updated the status of jira TEIIDDES-2698 to Resolved
Comment 5 JBoss JIRA Server 2016-07-25 11:43:29 EDT
Matus Makovy <mmakovy@redhat.com> updated the status of jira TEIIDDES-2698 to Closed

Note You need to log in before you can comment on or make changes to this bug.