Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
We are currently facing an issue with OData V4 service created using SAP Gateway framework.
Service Root URL:
The payload we receive from the service is as below,
{
"@odata.context": "$metadata#MeasurementDocument(MeasurementDocument,MeasuringPoint)",
"@odata.metadataEtag": "W/\"20220323004446\"",
"value":
[
{ "MeasurementDocument": "1", "MeasuringPoint": "2" }
,
{ "MeasurementDocument": "2", "MeasuringPoint": "3" }
,
.
.
.
{ "MeasurementDocument": "3", "MeasuringPoint": "2" }
,
],
"@odata.nextLink": "/sap/opu/odata4/sap/api_measurementdocument/srvd_a2x/sap/measurementdocument/0001/MeasurementDocument?$select=MeasurementDocument,MeasuringPoint&$skiptoken=100"
}
The server response is correct:
- The next-link is a host-relative URL with absolute path
- The context URL is a relative URL with relative path
- This means the context URL has to be resolved relative to the request URL – the service root URL never plays a role in resolving relative requests
- http://cc3-715-api.wdf.sap.corp:443/sap/opu/odata4/sap/api_measurementdocument/srvd_a2x/sap/measurementdocument/0001/MeasurementDocument
- This results in an absolute context URL of
- http://cc3-715-api.wdf.sap.corp:443/sap/opu/odata4/sap/api_measurementdocument/srvd_a2x/sap/measurementdocument/0001/$metadata
- Against which the next-link is resolved, ignoring everything except the scheme, host, and port:
- http://cc3-715-api.wdf.sap.corp:443/sap/opu/odata4/sap/api_measurementdocument/srvd_a2x/sap/measurementdocument/0001/MeasurementDocument?$select=MeasurementDocument,MeasuringPoint&$skiptoken=100
So this seems to be a problem with the Olingo library.