olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Amend (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OLINGO-1025) Issue in Excel with relative context URI
Date Thu, 26 Jan 2017 10:33:24 GMT

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

Christian Amend resolved OLINGO-1025.
       Resolution: Fixed
         Assignee: Christian Amend
    Fix Version/s: V2 2.0.9


You can use the "serviceRoot(URI)" method in the builder to get absolute URLs.

Best Regards,

> Issue in Excel with relative context URI
> ----------------------------------------
>                 Key: OLINGO-1025
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1025
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.3.0
>            Reporter: Olivier VERMONT
>            Assignee: Christian Amend
>             Fix For: V2 2.0.9
> Hi Olingo Team,
> I'm trying out your library to publish an odata v4 stream to Excel Power Query.
> I started with your tutorial and ran into this first issue : Excel requires absolute
metadata URL in service document which I solved by creating a custom processor as indicated
here : https://issues.apache.org/jira/browse/OLINGO-758
> That enabled me to go one step further but I got stuck again when I requested /Products
because of the m:context which also seems to be relative : m:context="$metadata#Products"
> I tried playing with the ContextURL but I only managed to come up with this which Excel
doesn't like either : m:context="../../../../$metadata#Products 
> Here is the code in the DemoEntityCollectionProcessor.java :
> ContextURL contextUrl = ContextURL.with().entitySet(edmEntitySet).oDataPath(request.getRawBaseUri()).build();
> EntitySerializerOptions options = EntitySerializerOptions.with().contextURL(contextUrl).build();
> Here is the message I get in Excel :
> DataSource.Error: OData : The top level context URL '$metadata#Products' should be an
absolute Uri.
> Détails :
>     DataSourceKind=OData
>     DataSourcePath=http://mydomain.net/Developpement/SettOData.nsf/odata.xsp/Products
> Could anyone please help me to solve this issue ?
> Regards,

This message was sent by Atlassian JIRA

View raw message