M Carissimi created OLINGO-221:
----------------------------------
Summary: Setting DataServiceVersion to 2.0
Key: OLINGO-221
URL: https://issues.apache.org/jira/browse/OLINGO-221
Project: Olingo
Issue Type: Question
Components: odata2-core
Affects Versions: V2 1.1.0
Reporter: M Carissimi
Priority: Minor
Hello,
I have created a service with the v2 1.1.0 release of Olingo and the
DataServiceVersion property is always shown as 1.0 in the metadata.
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
Version="1.0">
<edmx:DataServices
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
m:DataServiceVersion="1.0">
...
How do I change the code to display DataServiceVersion of 2.0? Alternatively,
how do I change the MaxDataServiceVersion property to 2.0?
I attempted to use the following readMetadata implementation but it didn't help
@Override
public ODataResponse readMetadata(final GetMetadataUriInfo aUriInfo, final
String aContentType) throws ODataException
{
final EdmServiceMetadata edmServiceMetadata =
getContext().getService().getEntityDataModel().getServiceMetadata();
return ODataResponse.status(HttpStatusCodes.OK)
.header(ODataHttpHeaders.DATASERVICEVERSION, ODataServiceVersion.V20)
.entity(edmServiceMetadata.getMetadata()).build();
}
Regards
Miki
--
This message was sent by Atlassian JIRA
(v6.2#6252)