You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Prasanth Ganesh Rao (Jira)" <ji...@apache.org> on 2022/04/05 05:27:00 UTC

[jira] [Updated] (OLINGO-1563) Olingo Client does not resolution for next link is not correct

     [ https://issues.apache.org/jira/browse/OLINGO-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prasanth Ganesh Rao updated OLINGO-1563:
----------------------------------------
    Summary: Olingo Client does not resolution for next link is not correct  (was: Olingo Client does not resolution next link correct)

> Olingo Client does not resolution for next link is not correct
> --------------------------------------------------------------
>
>                 Key: OLINGO-1563
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1563
>             Project: Olingo
>          Issue Type: Bug
>            Reporter: Prasanth Ganesh Rao
>            Priority: Major
>             Fix For: (Java) V4 4.9.0
>
>
> We are currently facing an issue with OData V4 service created using SAP Gateway framework.
> Service Root URL:
> [http://cc3-715-api.wdf.sap.corp:443/sap/opu/odata4/sap/api_measurementdocument/srvd_a2x/sap/measurementdocument/0001]
> The payload we receive from the service is as below,
> {
>     "@odata.context": "$metadata#MeasurementDocument(MeasurementDocument,MeasuringPoint)[",|mailto:%22,%0d%20%20%20%20%22@odata.metadataEtag]
> [    "@odata.metadataEtag|mailto:%22,%0d%20%20%20%20%22@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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)