[teiid-issues] [JBoss JIRA] (TEIIDSB-190) REST with request payload throws an error

Sadhana Nandakumar (Jira) issues at jboss.org
Tue Apr 14 18:18:28 EDT 2020


Sadhana Nandakumar created TEIIDSB-190:
------------------------------------------

             Summary: REST with request payload throws an error
                 Key: TEIIDSB-190
                 URL: https://issues.redhat.com/browse/TEIIDSB-190
             Project: Teiid Spring Boot
          Issue Type: Enhancement
          Components: core
            Reporter: Sadhana Nandakumar


TEIID spring boot is expecting the payload to be a bean, and hence throws an error. POST without request body works fine without any issues.

 CREATE VIEW StockPrice (
            symbol string PRIMARY KEY,
            price double
        ) AS  
            SELECT  p.symbol, y.price
            FROM accounts.PRODUCT as p, TABLE(call invokeHttp(action=>'POST', endpoint=>QUERYSTRING('predict'), headers=>jsonObject('application/json' as "Content-Type"), request=>jsonObject('PLATINUM' as "customerClass"))) as x,
            JSONTABLE(JSONPARSE(x.result,true), '$' COLUMNS price double path '@.data.segment') as y

No errors on build, when I query the odata endpoint, I see the following error.

<error xmlns="http://docs.oasis-open.org/odata/ns/metadata">
<code>TEIID30504</code>
<message>
TEIID30504 quotesvc: No bean named '{"customerClass":"PLATINUM"}' available
</message>
</error>




--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the teiid-issues mailing list