Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
(Java) V4 4.8.0
-
None
-
None
Description
We are trying to read metadata for https://services.odata.org/V4/(S(qumvkqavql1jwrawmicd45j1))/TripPinServiceRW/$metadata
using below snippet of code.
ODataClient client = ODataClientFactory.getClient();
this.edm = client.getReader().readMetadata(metadataStream);
As you can see above service has a 'Singleton" named "me". When we try to retrieve the singletons from EntityContainer we get nothing(as shown below).
edm.getSchemas().stream() .map(EdmSchema::getEntityContainer) .filter(Objects::nonNull).map(EdmEntityContainer::getSingletons) .flatMap(Collection::stream) .collect(Collectors.toList());