cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot load Odata Service -Invalid HTTP status code 501

former_member192434
Active Contributor
0 Kudos

Hi Experts,

i'm trying to consume Odata Model in controller and binding it to UI5 table, but unfortunately its throwing below exception in Google Chrome Development console.. any help would be highly appreciated.

Also try to disable Google security  by passing this "--disable-web-security" Target Tab.

2datajs.js:17 OPTIONS http://services.odata.org/V4/Northwind/Northwind.svc/$metadata 501 (Not Implemented)

datajs.js:17 XMLHttpRequest cannot load http://services.odata.org/V4/Northwind/Northwind.svc/$metadata. Invalid HTTP status code 501

2datajs.js:17 OPTIONS http://services.odata.org/V4/Northwind/Northwind.svc/$metadata 501 (Not Implemented)

datajs.js:17 XMLHttpRequest cannot load http://services.odata.org/V4/Northwind/Northwind.svc/$metadata. Invalid HTTP status code 501

Thanks

Ab

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

var oModel = new sap.ui.model.odata.ODataModel("proxy/http/services.odata.org/V4/Northwind/Northwind.svc/");

Use pxoxy and i don't think you need to include metadata. Try removing the metadata and run it

former_member192434
Active Contributor
0 Kudos

thanks for update Indrajith,

im using proxy before url, metadata geting added automaticlly. not sure why this happing

thanka

AB

Former Member
0 Kudos

I would rather suggest you to use version 3 of nortwind, instead of version 4.

former_member192434
Active Contributor
0 Kudos

same issue coming for version 3 also, my question is if other people able to use same service then why its coming for me..is there any sort of configuration required on chrome and eclipse.?

Former Member
0 Kudos

There is no specific configuration available for that.  Why not update your web browser and include the url in the source of the script tag in index.html. Wish there is some luck

former_member192434
Active Contributor
0 Kudos

try that also, no sucess.any more update

Former Member
0 Kudos

have a look at venkatesh answer in

may be it solves your issue

joao_sousa2
Active Contributor
0 Kudos

Can you check if the proxy is redirecting to the correct URL? That URL should be working, not throwing a 501.

former_member192434
Active Contributor
0 Kudos

when i use proxy this the URL getting redirected : http://services.odata.org/V3/Northwind/Northwind.svc/Orders?$top=5&$skiptoken=10635

i can access this url from browser without any issue.

former_member192434
Active Contributor
0 Kudos

try that also no success.

former_member192434
Active Contributor
0 Kudos

issue Resolved now, NO idea.... what was issue .now same application pulling the record. only thing i did it just uninstall Google chrome and re-installed it... I'm not sure what was any issue with chrome or issue was something else...if any one has this kind of issue plz post it here.will be happy to hear the solution .

Thanks for your support

Answers (1)

Answers (1)

former_member311260
Discoverer
0 Kudos

Hi Anup,


Due to chrome updated the methods of disable web security so you have to follow below way.


For Window8-

In Search bar write below command

--disable-web-security --user-data-dir


For Window10-

In Run Write below command

--disable-web-security --user-data-dir


Note: before trigger commands chrome should be close.


Hope its Work for you.


Regards

Iqbal