[ 
https://issues.apache.org/jira/browse/OLINGO-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694732#comment-14694732
 ] 

Michael Bolz commented on OLINGO-758:
-------------------------------------

Hello [~riccardomariani],

As [~rareddy] mentioned, based on [specification (section 
4.5.1)|http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata02/os/odata-json-format-v4.0-errata02-os-complete.html#_Toc403940615]
 the {{odata.context}} can be relative or absolut.

{quote}
The odata.context annotation returns the context URL ... for the payload. This 
URL can be absolute or relative.
{quote}

And the {{DefaultProcessor}} returns the relative URL.

Best Regards,
Michael

> Wrong @odata.context returned by DefaultProcessor when requesting the service 
> document
> --------------------------------------------------------------------------------------
>
>                 Key: OLINGO-758
>                 URL: https://issues.apache.org/jira/browse/OLINGO-758
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.0.0-beta-03
>            Reporter: Riccardo Mariani
>
> Requesting the service document http://host/service, the DefaultProcessor 
> return this odata context in the response: 
> @odata.context: "$metadata"
> I think it should be 
> @odata.context: "http://host/service/$metadata";
> In the DefaultProcessor the response is set as:
> response.setContent(serializer.serviceDocument(serviceMetadata, 
> null).getContent());
> I think the response should be set as:
> response.setContent(serializer.serviceDocument(serviceMetadata, 
> request.getRawBaseUri()).getContent()); 



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

Reply via email to