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

OData 4 parsing older service metadata

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • (Java) V4 4.5.0
    • odata4-client
    • None

    Description

      If you point the OData 4 client to older metadata, for example http://services.odata.org/Northwind/Northwind.svc/$metadata the result will be metadata with null values where non-null is expected.

      ClientODataDeserializerImpl deserializer = 
                              new ClientODataDeserializerImpl(false, ContentType.APPLICATION_XML);
      XMLMetadata serviceMatadata = deserializer.toMetadata(out.getBinaryStream());
      CsdlSchema csdlSchema = metadata.getSchemas().get(0);
      CsdlEntityContainer container = csdlSchema.getEntityContainer(); 
      //container is null
      

      It would be good if XMLMetadata exposed the DataServices version information, or if Olingo could do some check of them when parsing to validate expectations.

      This was also captured as https://issues.jboss.org/browse/TEIID-5071

      Attachments

        Activity

          People

            rareddy Ramesh Reddy
            shawkins Steven Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: