Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1197

Support for predefinedNamespaces in Edm Metadata

    XMLWordPrintableJSON

Details

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            MikeJung01 Michael Jung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: