Olivier VERMONT created OLINGO-1025:
---------------------------------------

             Summary: 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


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
(v6.3.4#6332)

Reply via email to