cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Getting date from Odata service after deploying the application in Tomcat server in another system

former_member193103
Participant
0 Kudos

Hi Experts,

I am trying to call odata service by using

var oModel = new sap.ui.model.odata.ODataModel(

    "proxy/http/#############:8000/sap/opu/odata/sap/ZUSERINFO_VER_SRV/",

    true,"username","password");

and I am able to GET data from it in localhost. But when I deployed the application in the tomcat server on another system, I am not able to GET  data from the service. Can anyone please tell me why I am not getting the data???

Thanks

Himadri

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184238
Participant
0 Kudos

Hi,

Can you find out which error you are getting in Console?

I guess that you are getting Cross Origin Resource problem. If you get this error,  disable the web security in chrome.

If not  please mention the error which you got in console.

Thanks&Regards

Sridevi

former_member193103
Participant
0 Kudos

Hi,

Thank you for your reply. The error I getting in the console

  1. OPTIONS http://vikalpng.vikalpaws.com:8000/sap/opu/odata/sap/ZUSERINFO_VER_SRV/$metadata 401 (Unauthorized)
  2. XMLHttpRequest cannot load http://vikalpng.vikalpaws.com:8000/sap/opu/odata/sap/ZUSERINFO_VER_SRV/$metadata. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://vikalp.webhop.net:8080' is therefore not allowed access.
  3. 2014-06-12 11:53:40 The following problem occurred: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://gw_admin:vgupta%402013@vikalpng.vikalpaws.com:8000/sap/opu/odata/sap/ZUSERINFO_VER_SRV/$metad...'. - 
former_member184238
Participant
0 Kudos

yes, you are getting Cross Origin Problem .So, you need to disable the web security for chrome.

Go to properties of chrome , and add this after path of chrome.

--disable-web-security


After this restart the chrome.


Please follow the below link for reference.


windows - Is it possible to run Chrome with and without web security at the same time? - Super User


Regards

Sridevi