You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by "Roehrig, Stefan" <st...@vaillant-group.com> on 2014/10/09 17:59:43 UTC
Does olingo java v2 support http options method?
Hi all,
I've got the following behavior with an HTML5 application (based on SAPUI5, jQuery and datajs):
* Application deployed on the same server as the odata service:
Application retrieves $metadata with http get method
Everything works fine
* Application deployed on a different server than the odata service (WebStorm development scenario):
The odata service is enabled for CORS and sets the access-control-allow-origin header
Application retrieves $metadata with http options method
Service answers with http code 501 (not implemented)
Data loading fails
My questions:
* Does anyone know, why the application is using two different http methods?
* Is it possible for Olingo to support the http options method?
Regards,
Stefan
Re: Does olingo java v2 support http options method?
Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Stefan,
I have no idea why the application uses the options http method.
But I can ask a colleague if he can answer this.
Currently the http options is not supported in Olingo (neither own servlet “ODataServlet” nor via Apache CXF “ODataSubLocator”).
And as far as I know there exists currently no easy way to provide this.
Perhaps you could create an enhancement issue in Jira.
Kind regards,
Michael
On 09 Oct 2014, at 17:59, Roehrig, Stefan <st...@vaillant-group.com> wrote:
> Hi all,
>
> I’ve got the following behavior with an HTML5 application (based on SAPUI5, jQuery and datajs):
>
> · Application deployed on the same server as the odata service:
> Application retrieves $metadata with http get method
> Everything works fine
> · Application deployed on a different server than the odata service (WebStorm development scenario):
> The odata service is enabled for CORS and sets the access-control-allow-origin header
> Application retrieves $metadata with http options method
> Service answers with http code 501 (not implemented)
> Data loading fails
>
> My questions:
> · Does anyone know, why the application is using two different http methods?
> · Is it possible for Olingo to support the http options method?
>
> Regards,
> Stefan
AW: Does olingo java v2 support http options method?
Posted by "Roehrig, Stefan" <st...@vaillant-group.com>.
Hi,
the answer to my own question is:
It happens because the browser does a CORS request because of SOP.
The solution is to create a CORS filter in order to enable Olingo for CORS.
Regards,
Stefan
--
Stefan Röhrig – Consultant Group IT - BPM
Vaillant Group IT
Tel. +49 2191 18 4725 • Mobile +49 175 2951 757 • Fax +49 2191 18 74725
E-Mail: stefan.roehrig@vaillant-group.com<ma...@vaillant-group.com> • http://www.vaillant-group.com<http://www.vaillant-group.com/>
Vaillant Group Business Services GmbH, Berghauser Str. 63, D-42859 Remscheid
Sitz: Remscheid • Registergericht: Amtsgericht Wuppertal HRB 11591 • Geschäftsführer: Dr. Stefan Borchers, Cahit Gürdal Ergüven
Always think green before printing!
Von: Roehrig, Stefan [mailto:stefan.roehrig@vaillant-group.com]
Gesendet: Donnerstag, 9. Oktober 2014 18:00
An: user@olingo.apache.org
Betreff: Does olingo java v2 support http options method?
Hi all,
I’ve got the following behavior with an HTML5 application (based on SAPUI5, jQuery and datajs):
· Application deployed on the same server as the odata service:
Application retrieves $metadata with http get method
Everything works fine
· Application deployed on a different server than the odata service (WebStorm development scenario):
The odata service is enabled for CORS and sets the access-control-allow-origin header
Application retrieves $metadata with http options method
Service answers with http code 501 (not implemented)
Data loading fails
My questions:
· Does anyone know, why the application is using two different http methods?
· Is it possible for Olingo to support the http options method?
Regards,
Stefan