Daniel Fernández created OLINGO-1395:
----------------------------------------
Summary: EDM parsing error when ReturnType element contains
Annotation
Key: OLINGO-1395
URL: https://issues.apache.org/jira/browse/OLINGO-1395
Project: Olingo
Issue Type: Bug
Components: odata4-client
Affects Versions: (Java) V4 4.6.0
Reporter: Daniel Fernández
*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):
{code:xml}
<ReturnType Type="tm1.Hierarchy" Nullable="false">
<Annotation Term="Core.Description">
<String>The newly created all leaves hierarchy.</String>
</Annotation>
</ReturnType>
{code}
...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.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)