on 2021 Jan 21 9:27 AM
Hi all,
I have a CAP Project that consuming SAP HANA Service OData service V2
"dataSources": {
"storeService": {
"uri": "/v2/StoreMasterData",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
}
Different views are defined in the context, and they work fine with GET in OData v4.
But some views (not all are affected by this issue!), created in the same way of the others, are not working with GET in OData v2.
If I check the Header Response I see that the content-type is different, and I'm not able to understand way.
Here one example:
Response Header / content-type is always application/json;odata.metada=minimal
Instead, if the same view is called by GET in OData v2, I receive the Internal Server Error, and the Response Header / content-type is text/html; charset=utf-8
Does somebody have any idea about what is wrong?
Regards,
Carmen.
Request clarification before answering.
Is this an entity with analytic capabilities? If there is no key defined in the entity it will work in V4 but throw an error in V2. Please check the logs that you see when the V2 request is done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the content-type in proper odata v2 responses should either by `application/json` or `application/xml` - given that in your example it is `text/html` there might be an error in the GET request, delivered as a webpage. the only way i see to gain more insight is that you fire up the debugger and inspect the `response`.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
46 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.