Michael Jung created OLINGO-1197: ------------------------------------ Summary: Support for predefinedNamespaces in Edm Metadata Key: OLINGO-1197 URL: https://issues.apache.org/jira/browse/OLINGO-1197 Project: Olingo Issue Type: New Feature Components: odata2-annotation Affects Versions: (Java) V4 4.4.0 Reporter: Michael Jung Priority: Minor
Hi, org.apache.olingo.odata2.core.ep.producer.XmlMetadataProducer.getMetadata is called from org.apache.olingo.odata2.core.edm.provider.EdmServiceMetadataImplProv.getMetadata always without handing over predefinedNamespace. This produces ugly metadata as the namespace is repeated in all properties, e.g.: <Property xmlns:sap="http://www.sap.com/Protocols/SAPData" Name="ID" Type="Edm.String" sap:label="Identifier"/> <Property xmlns:sap="http://www.sap.com/Protocols/SAPData" Name="DESC" Type="Edm.String" Nullable="true" sap:label="Description"/> I would see a possible fix in the addition of a getPredefinedNamespace method in the EdmProvider class, and calling this in EdmServiceMetadataImplProv.getMetadata to provide it to the XmlMetadataProducer. I do not fully grasp the usage of EdmProvider -- This message was sent by Atlassian JIRA (v6.4.14#64029)