[teiid-issues] [JBoss JIRA] (TEIID-4282) send and receive json to rest API from teiid
Steven Hawkins (JIRA)
issues at jboss.org
Mon Jun 20 18:29:00 EDT 2016
[ https://issues.jboss.org/browse/TEIID-4282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254889#comment-13254889 ]
Steven Hawkins commented on TEIID-4282:
---------------------------------------
This seems more like a forum posting rather than an issue. Can you be more explicit about what is not working? Or if you are just looking for pointers, then start a new forum topic.
> I am not able to send JSON query as part of request.
Can you provide an example of what you are doing?
> Here I am not able to create jsonObject, it is expecting DerivedColoumns
Are you creating a custom translator based upon the WS translator? Can you provide the code?
> Can you please suggest me how I can send JSON object as part of REST API request.Thanks for help.
To send JSON:
EXEC source.invokeHttp(action => 'POST',
request => jsonValue,
endpoint => 'http://host/processTEIIDJsonQueryReq')
where jsonValue is String, Blob, or Clob value of the json. You can use the JSON* Teiid functions to construct a JSON value.
> send and receive json to rest API from teiid
> --------------------------------------------
>
> Key: TEIID-4282
> URL: https://issues.jboss.org/browse/TEIID-4282
> Project: Teiid
> Issue Type: Bug
> Components: Embedded
> Affects Versions: 8.13.5
> Reporter: Surendhar T
> Assignee: Steven Hawkins
>
> Hi Steven/ Ramesh,
> We have an REST streaming api, which will excepts JSON as input and returns JSON as output.
> @POST
> @Consumes({MediaType.APPLICATION_JSON})
> @Produces({MediaType.APPLICATION_JSON})
> @Path("/processTEIIDJsonQueryReq")
> public Response processTEIIDJsonQueryReq(TEIIDJsonRequest Req) throws Exception{
>
>
> }
> We used existing WSExecutionFactory as translator to send/receive JSON Req as stream.
> I am not able to send JSON query as part of request. I followed below references
> https://docs.jboss.org/author/display/TEIID/Web+Services+Translator
> Here I am not able to create jsonObject, it is expecting DerivedColoumns
> https://issues.jboss.org/browse/TEIID-3016
> https://developer.jboss.org/thread/240453?start=0&tstart=0
> https://developer.jboss.org/thread/253551?start=0&tstart=0
> https://developer.jboss.org/message/923210#923210
>
> As some of links you and Ramesh mentioned about TEIID Designer(to see how procedure created), their is also I am not succeeded. invokeHTTP is the method I am using
> I am using below codes
> https://github.com/teiid/teiid-embedded-examples/tree/master/restservice-as-a-datasource/src/main/java/org/teiid/example
> https://github.com/teiid/teiid-embedded-examples/tree/master/socialmedia-integration
> Can you please suggest me how I can send JSON object as part of REST API request.Thanks for help.
> Thanks,
> Surendhar
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the teiid-issues
mailing list