Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
(Java) V4 4.4.0
-
None
-
None
Description
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