]
Ramesh Reddy logged work on TEIIDSB-190:
----------------------------------------
Author: Ramesh Reddy
Created on: 21/Apr/20 12:08 PM
Start Date: 21/Apr/20 12:08 PM
Worklog Time Spent: 1 hour
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes
Time Spent: 1 hour
Worklog Id: (was: 12450861)
REST with request payload throws an error
-----------------------------------------
Key: TEIIDSB-190
URL:
https://issues.redhat.com/browse/TEIIDSB-190
Project: Teiid Spring Boot
Issue Type: Bug
Components: core
Reporter: Sadhana Nandakumar
Assignee: Ramesh Reddy
Priority: Major
Fix For: 1.5.0, 8.0-tp1-1.4.x
Time Spent: 1 hour
Remaining Estimate: 0 minutes
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>