[
https://issues.apache.org/jira/browse/OLINGO-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16057141#comment-16057141
]
Ramya commented on OLINGO-1130:
-------------------------------
Hi Gauri,
If you still need to fetch the EdmTerm then this issue is fixed with the commit
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=8f1a079faf2f0a327681deb879dcc6d127d561da.
The readMetadata function now can take 2 parameters
1. Edmx file as an input stream
2. External vocabulary which includes term definition as an input stream
If the edmx has Edmx:Reference uri pointing to the external definition then
call the toMetadata function to fetch this uri. Then make a request to this uri
to fetch the term definition schema. Later call the readMetadata method.
Regards,
Ramya
> Unable to fetch property annotations
> -------------------------------------
>
> Key: OLINGO-1130
> URL: https://issues.apache.org/jira/browse/OLINGO-1130
> Project: Olingo
> Issue Type: Bug
> Components: odata4-client
> Reporter: Gauri Kalra
>
> While trying to fetch metadata from the following end-point:
> http://services.odata.org/V4/TripPinService/$metadata
> and using the following code snippet to fetch annotations using Olingo
> library version 4.3.0:
> List<EdmAnnotation> annotations = property.getAnnotations();
> if(annotations.size() != 0) {
> EdmAnnotationImpl impl = (EdmAnnotationImpl) annotations.get(0);
> CsdlTerm csterm = new CsdlTerm();
> csterm.setName("Org.OData.Core.V1.Computed");
> EdmTerm term = new EdmTermImpl(edm,
> "Microsoft.OData.SampleService.Models.TripPin", csterm);
> EdmAnnotation ann = impl.getAnnotation(term, null);
> }
> the value returned is null.
> Is there another way that one can fetch property-level annotations?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)