on 03-21-2016 8:49 AM
Hi All,
I have following questions.
1. I have a requirement to fetch Metadata of the Entity along with the GetEntity/EntitySet operation
Is there any way out for this? url service
/sap/opu/odata/SAP/ZTEST_FLIGHT_SRV/carrierSet?$metadata (This is giving only the fetched data I also need EDM details).
2. Metadata definition of the project gives all the details of EDM types in XML only, Is there any way to obtain the same data in Json format?
Url Service used
/sap/opu/odata/SAP/ZTEST_FLIGHT_SRV/?$metadata
tried using
/sap/opu/odata/SAP/ZTEST_FLIGHT_SRV/?$format=json (This gives only entityset details not the EDM details)
Please help me on this
Thanks
Vishnu
Hello Vishnu,
1. With URL /sap/opu/odata/SAP/ZTEST_FLIGHT_SRV/carrierSet?$metadata, you will only get the data not the Edm details. As far as i know a single response having both data and Edm details is not possible.
2. Fetching metadata in JSON is not supported.
URL /sap/opu/odata/SAP/ZTEST_FLIGHT_SRV/?$format=json will return all entity set details which is the correct observation.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Regarding Question 1: it is not possible to get metadata along with response in OData V2.
The reason is metadata does not change so one can get the metadata and utilize if for understanding of any kind of data under the same odata service. It is not required to fire metadata call with every Data request. Also from server point of view metadata calls are expensive in nature.
Also this is how UI5 works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.