[ 
https://issues.apache.org/jira/browse/OLINGO-1062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lars Laegner updated OLINGO-1062:
---------------------------------
    Description: 
The http://services.odata.org/TripPinRESTierService/ service returns the 
following annotation:
...
<EntitySet Name="Airlines" 
EntityType="Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline"> 
<Annotation Term="Org.OData.Core.V1.OptimisticConcurrency"> <Collection> 
<PropertyPath>Name</PropertyPath> </Collection> </Annotation> </EntitySet> ...

unfortunately, the used Org.OData.Core.V1 namespace is not referencing anywhere 
an alias or namespace in the schema.
This results, when retrieving the code with the latest available OData V4 Lib 
for Java, in the EdmAnnotationClass Code

public EdmTerm getTerm() { 
if (term == null) { 
if (annotation.getTerm() == null) { throw new EdmException("Term must not be 
null for an annotation."); } 
term = edm.getTerm(new FullQualifiedName(annotation.getTerm())); 
} 
return term; }

that in debugging the 
annotation.getTerm()=="Org.OData.Core.V1.OptimisticConcurrency" but the term is 
then set to null from edm.getTerm() as it seems to check for available 
namespace/aliases in the schema and cannot find one.

So practically, this annotation does not exist for the currently latest 
Olingo-OData-Client-for-Java-4.3.0

The same for 
http://services.odata.org/V4/(S(tauqx0n1pg4nytucatnssdwb))/TripPinServiceRW/

I have cross created this issue in 
https://github.com/OData/odataorg.github.io/issues/117 as i am not sure, wether 
the service is not correct or the client should be more forgiving

  was:
The http://services.odata.org/TripPinRESTierService/ service returns the 
following annotation:
...
<EntitySet Name="Airlines" 
EntityType="Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline"> 
<Annotation Term="Org.OData.Core.V1.OptimisticConcurrency"> <Collection> 
<PropertyPath>Name</PropertyPath> </Collection> </Annotation> </EntitySet> ...

unfortunately, the used Org.OData.Core.V1 namespace is not referencing anywhere 
an alias or namespace in the schema.
This results, when retrieving the code with the latest available OData V4 Lib 
for Java, in the EdmAnnotationClass Code

public EdmTerm getTerm() { 
if (term == null) { 
if (annotation.getTerm() == null) { throw new EdmException("Term must not be 
null for an annotation."); } 
term = edm.getTerm(new FullQualifiedName(annotation.getTerm())); 
} 
return term; }

that in debugging the 
annotation.getTerm()=="Org.OData.Core.V1.OptimisticConcurrency" but the term is 
then set to null from edm.getTerm() as it seems to check for available 
namespace/aliases in the schema and cannot find one.

So practically, this annotation does not exist for the currently latest 
Olingo-OData-Client-for-Java-4.3.0

The same for 
http://services.odata.org/V4/(S(tauqx0n1pg4nytucatnssdwb))/TripPinServiceRW/


> Cannot consume Odata Reference Services with Annotations
> --------------------------------------------------------
>
>                 Key: OLINGO-1062
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1062
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: (Java) V4 4.3.0
>            Reporter: Lars Laegner
>
> The http://services.odata.org/TripPinRESTierService/ service returns the 
> following annotation:
> ...
> <EntitySet Name="Airlines" 
> EntityType="Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline"> 
> <Annotation Term="Org.OData.Core.V1.OptimisticConcurrency"> <Collection> 
> <PropertyPath>Name</PropertyPath> </Collection> </Annotation> </EntitySet> ...
> unfortunately, the used Org.OData.Core.V1 namespace is not referencing 
> anywhere an alias or namespace in the schema.
> This results, when retrieving the code with the latest available OData V4 Lib 
> for Java, in the EdmAnnotationClass Code
> public EdmTerm getTerm() { 
> if (term == null) { 
> if (annotation.getTerm() == null) { throw new EdmException("Term must not be 
> null for an annotation."); } 
> term = edm.getTerm(new FullQualifiedName(annotation.getTerm())); 
> } 
> return term; }
> that in debugging the 
> annotation.getTerm()=="Org.OData.Core.V1.OptimisticConcurrency" but the term 
> is then set to null from edm.getTerm() as it seems to check for available 
> namespace/aliases in the schema and cannot find one.
> So practically, this annotation does not exist for the currently latest 
> Olingo-OData-Client-for-Java-4.3.0
> The same for 
> http://services.odata.org/V4/(S(tauqx0n1pg4nytucatnssdwb))/TripPinServiceRW/
> I have cross created this issue in 
> https://github.com/OData/odataorg.github.io/issues/117 as i am not sure, 
> wether the service is not correct or the client should be more forgiving



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to