You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Sumit (JIRA)" <ji...@apache.org> on 2017/06/22 09:48:00 UTC
[jira] [Created] (OLINGO-1142) [OData Client] - Referenced
metadata documents are not parsed recursively
Sumit created OLINGO-1142:
-----------------------------
Summary: [OData Client] - Referenced metadata documents are not parsed recursively
Key: OLINGO-1142
URL: https://issues.apache.org/jira/browse/OLINGO-1142
Project: Olingo
Issue Type: Bug
Components: odata4-client
Reporter: Sumit
Let's say there is a service metadata document as follows
{code}
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="http://vocabularies.odata.org/OData.Community.Display.V1.xml">
<edmx:Include Namespace="OData.Community.Display.V1" Alias="Display" />
<edmx:IncludeAnnotations TermNamespace="OData.Community.Display.V1" />
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="some.namespace" Alias="mscrm" xmlns="http://docs.oasis-open.org/odata/ns/edm">
....
</Schema>
<edmx:DataServices>
</edmx:Edmx>
{code}
The referenced document http://vocabularies.odata.org/OData.Community.Display.V1.xml in the above metadata document includes another document
{code}
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/os/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OData.Community.Display.V1">
...
</Schema>
</edmx:DataServices>
</edmx:Edmx>
{code}
According to OData spec(http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part3-csdl/odata-v4.0-errata03-os-part3-csdl-complete.html#_Toc453752504)
_The scope of a CSDL document is the document itself and all schemas included from directly referenced documents. All entity types, complex types and other named elements in scope (that is, defined in the document itself or a schema of a directly referenced document) can be accessed from a referencing document by their namespace-qualified names._
So, one should be able to use types or annotations defined in {{Org.OData.Core.V1}} namespace in the original metadata document. The {{XMLMetadataRequestImpl}} only adds the things defined in the directly referenced metadata document to the returned metadata. So annotation defined in {{Org.OData.Core.V1}} are not available in Edm.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)