-
1. Re: We have a web service that returns JSON where each JSON structure will have URI:"some URL". I want instead of "some URL", the whole response of that URL in the JSON output itself. How do I do that with ODATA? Using $expand can it help? if yes, any sam
rareddy Jun 23, 2015 2:25 PM (in response to iginsk)Wow, your subject titles are longer than the question Choose smaller descriptive description? For example "OData $expand example for JSON Data?"
Did you write this web service or you are using the OData service from Teiid?
With the release of Teiid 8.11.Final over the weekend, Teiid supports OData V2 and as well as OData V4. I am guessing you are using the V2, where $expand support is not available. V4 does support $expand functionality but in limited fashion right now. I.e. It supports expanding first navigation property (this restriction is due to how SQL queries needs to be built for the functionality). The OData spec you can find it at http://odata.org This site also has many examples. Basically you need to issue query like
http://host:port/odata4/<vdbname>/<model-name>/<table-name>?$expand=<navigation>
Ramesh..
-
2. Re: We have a web service that returns JSON where each JSON structure will have URI:"some URL". I want instead of "some URL", the whole response of that URL in the JSON output itself. How do I do that with ODATA? Using $expand can it help? if yes, any sam
iginsk Jun 23, 2015 6:22 PM (in response to rareddy)Hi Ramesh, thanks for hinting me on smaller titles. I did not worried how it looks, at that time. But, for sure I will take care going forward.
I am using Data Virtualization 6.1.0 where the VDBs being developed with the Teiid designer perspective of JBDS 8.1.0GA and deploy on EAP 6.3 platform. - fyi.
So, do you think it should work without any further changes in my setup?
The webservices are developed using DV.
Regards,
Kiran
-
3. Re: We have a web service that returns JSON where each JSON structure will have URI:"some URL". I want instead of "some URL", the whole response of that URL in the JSON output itself. How do I do that with ODATA? Using $expand can it help? if yes, any sam
iginsk Jun 23, 2015 6:35 PM (in response to iginsk)Ramesh,
I see in my JBDS in the default server window, Teiid 8.7.1 where the default server is set to EAP 6.0.
1. Should I change this to anything else? If yes, please suggest.
2. Perhaps, just for my clarity correct me if i am wrong, I understand DV should have been the successor or Teiid. While I am working with DV already, why this Teiid again? Is it the underlying engine/lib of DV still called Teiid?
So, in essence if have to specify my environment, i need to mention the platform to be EAP 6.3 (because that is my root folder),
DV 6.1.0 (because I see when i start up the server, this is what i see.,
Teiid 8.7.1 because I see it in the default server window of JBDS
and Default server I added is NOT EAP 6+, rather it is just 6.
Am I right? Bit confused, please clarify.
Regards,
Kiran
-
4. Re: We have a web service that returns JSON where each JSON structure will have URI:"some URL". I want instead of "some URL", the whole response of that URL in the JSON output itself. How do I do that with ODATA? Using $expand can it help? if yes, any sam
rareddy Jun 24, 2015 8:03 AM (in response to iginsk)Yes, DV 6.1 is based on Teiid 8.7.1 and EAP 6.3.
In this version only has support for OData V2. If you deployed the VDB successfully, then OData access is readily available at url
http://host:31000/odata/vdbname/model.tablename
If you want JSON, you can send "Accepts" header as "application/json;charset=utf-8" or write url as
http://host:31000/odata/vdbname/model.tablename?$format=json
As I mentioned earlier the $expand support is not available in this version.
-
5. Re: We have a web service that returns JSON where each JSON structure will have URI:"some URL". I want instead of "some URL", the whole response of that URL in the JSON output itself. How do I do that with ODATA? Using $expand can it help? if yes, any sam
iginsk Jun 26, 2015 5:35 AM (in response to iginsk)So, to have support for odata v4, which version of DV i should install?
-
6. Re: We have a web service that returns JSON where each JSON structure will have URI:"some URL". I want instead of "some URL", the whole response of that URL in the JSON output itself. How do I do that with ODATA? Using $expand can it help? if yes, any sam
rareddy Jun 26, 2015 7:57 AM (in response to iginsk)There is DV product for this yet, it will be in DV 6.3, which will be released towards the end of the year.
It is available in the community version of DV, and it is called Teiid. The feature is available in 8.11.Final