olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chenggong li (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OLINGO-1187) Metadata Parser is unable to parse 2 schemas
Date Thu, 28 Sep 2017 08:59:00 GMT

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

chenggong li closed OLINGO-1187.
--------------------------------
    Resolution: Won't Fix

Invalid metadata

> Metadata Parser is unable to parse 2 schemas
> --------------------------------------------
>
>                 Key: OLINGO-1187
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1187
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: (Java) V4 4.4.0
>            Reporter: chenggong li
>
> metadata.xml like following:
> {code}
> <?xml version='1.0' encoding='utf-8'?>
> <edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
>     <edmx:DataServices m:DataServiceVersion="3.0">
>         <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="EntitisModel">
>         </Schema>
>         <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="EntitiesNameSpace">
>         </Schema>
>     </edmx:DataServices>
> </edmx:Edmx>
> {code}
> My code like:
> {code}
> XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML).toMetadata(content);
> Map<String, CsdlSchema> xmlSchemas = metadata.getSchemaByNsOrAlias();
> Edm edm = client.getReader().readMetadata(xmlSchemas);
> List<EdmSchema> schemas = edm.getSchemas();
> for (EdmSchema schema : schemas) {
>     String namespace = schema.getNamespace();
>     LOGGER.debug("schema.namespace '" + namespace + "' ");
> }
> {code}
> Output:
> {code}
> DEBUG c.s.s.s.ODataReader - schema.namespace 'EntitisModel' 
> {code}
> We got "schema.namespace 'EntitisModel'" only, no "schema.namespace 'EntitiesNameSpace'"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message