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

EDM parsing error when ReturnType element contains Annotation

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (Java) V4 4.6.0
    • None
    • odata4-client

    Description

      Description

      The current EDM parsing infrastructure does not take into account the possibility that a <ReturnType> element contains an <Annotation>.

      This causes that a structure such as this (from a Cognos TM1 service):

      <ReturnType Type="tm1.Hierarchy" Nullable="false">
      	<Annotation Term="Core.Description">
      		<String>The newly created all leaves hierarchy.</String>
      	</Annotation>
      </ReturnType>
      

      ...ends up messing the close tags, and closing the element containing the <ReturnType> before it should, causing the rest of the EDM to be ignored and the service being inaccessible.

      Cause

      The cause seems to be that the parsing code in the org.apache.olingo.client.core.edm.xml.ClientCsdlReturnType class does not include Annotation among the possible elements contained inside a ReturnType.

      As can be seen in the spec at https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/csprd05/odata-csdl-xml-v4.01-csprd05.html#sec_ReturnType, the edm:ReturnType element may contain edm:Annotation elements.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dfernandez Daniel Fernández

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment