cancel
Showing results for 
Search instead for 
Did you mean: 

V2 oData CAP services, fetching data from external HDI are very unstable

Simona_A
Explorer
0 Kudos
369

I am building CAP app that fetches the data from remote HDI container. I need oData V2 services to use them in MDK app. CAP provides only oData V4 which I tried to convert to V2 with different adapters (like @cap-js-community/odata-v2-adapter@sap/cds-odata-v2-adapter-proxy@sap/cds-odata-v2-adapter-proxy )  but with all of them I am facing the same issue. The CAP app is deployed in Cloud Foundry.

The problem is: the call to the service many times works and many doesn't, it seams like very unstable, it gives me error like 'Service not available: objects' or '500 Internal Server Error' or 'Not Found". There is no pattern when it works and when it doesn't, but very often it doesn't. I am not excluding the fact that maybe between the data source and the CAP app is the problem, but if I try to open the data in the database explorer it always works fine. Any help or thoughts are very appreciated.

 

Thank you!

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Why not just use OData V4?  MDK works with V4 as well as V2 in offline and online mode.  If there is something specific with V4 that isn't working please let us know.

Simona_A
Explorer
0 Kudos
Thank you very much Bill for your fast answer. The reason I want OData V2 is because the MDK app is already created before and it used to work with V2 services. Do you know, if I change the OData to V4 now, what changes are required in the MKD app, or is it feasible to keep the old MKD app at all?
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos
I would expect it to just work. You would want to review your filter criteria to check for any issues but generally it will convert over easily. If you are using media entities and switching to stream properties you would of course need to make changes.