cancel
Showing results for 
Search instead for 
Did you mean: 

Sencha Architect 2.2 with XS OData Services

Former Member
0 Kudos

I would like to say that, i want to implement SAP HANA XS OData  services using with Sencha Architect 2.2.and i create XS services it's working fine on chrome URL"http://54.243.221.65:8000/TestData/StockDataIF.xsodata/Player?$top=3" data coming in xml format.but when i pass the same URL in RestProxy URL and createdAlies odata also.but after build when deploy on tom cat server it show error like "

  1. OPTIONS http://54.243.221.65:8000/TestData/StockDataIF.xsodata/Player?$top=3&%24skip=0&%24top=25 405 (Method Not Allowed) sencha-touch-all.js:21

XMLHttpRequest cannot load http://54.243.221.65:8000/TestData/StockDataIF.xsodata/Player?$top=3&%24skip=0&%24top=25. Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin. "

I am try to solved this problem last couple of days but till now i didn't get any solution Please can you help me what i am doing mistake.

    

     I find some form the problem of  CORS(Cross-Orign Resource Sharing) so can give the permission from SX OData Services.if possible then How?

     Please any body Help me.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

CORS access to XSODATA services will not be supported until SPS6.  Then we extend the .xsaccess file to allow adding the CORS allow headers to child services.

Until then, you best option is probably to run the sencha website from HANA as well. Assuming your UI is completely client side you just load the HTML/JavaScript for Sencha and your application UI into the HANA repository and run it from there instead of Tomcat.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi shambhu,

I got same errors. did you find any solution to the problem. if yes ,kindly let me know.

Watting  for your response

Thanks in Advance

With Regrads

Surendra Suryawanshi,

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Are you running HANA SP6?  If so you can allow CORS via the .xsaccess file now.  For example:

{

          "exposed": true,

          "authentication": [{ "method": "LogonTicket" },{ "method" : "Basic" }],

  "cors" : [{ "enabled":true }],

          "cache_control" : "must-revalidate"               

}

Former Member
0 Kudos

Hi Surendra,

I solved that problem, I run sencha application from HANA.Suppose your UI is completely client side you just load the HTML/JavaScript for Sencha and your application UI into the HANA repository and run it from there instead of Tomcat.

As per Thomous Jung instruction CORS access to XSODATA services will not be supported until SPS6.  Then we extend the .xsaccess file to allow adding the CORS allow headers to child services.so now the SP6 has released you can try with the new features.Till now i couldn't try SP6 feature hope it may be help full for you.

With Regards,

Shambhu Nath 

Former Member
0 Kudos

Hi Sambhu,

Thanks for the Reply

Actually I am not working in HANA so I tranfer my repository in my getway server and i created bsp application where i created html file  and  finally it worked.

but i want  to run the same application in mobile. If you have any solution for how to run it in mobile

Kindly let me know.

Thank in Advance

Redards

Surendra Suryawanshi

Former Member
0 Kudos

Hi Thomas,

Thanks for Reponse,

Actually I am not working in HANA so I tranfer my repository in my getway server and i created bsp application where i created html file  and  finally it worked.

but i want  to run the same application in mobile. If you have any solution for how to run it in mobile

Kindly let me know.

Thank in Advance

Former Member
0 Kudos

Thomas, I'm trying to enable CORS in my instance version 68, but just including "cors" : [{ "enabled":true }] on the .xsaccess file isn't working!

My current scenario is that I'm developing my code in an IIS server on my local machine and making some $.ajax to the server, but always returning error 401.

Any recommendations?

Thanks in advance