$(function () { pageContext.i18n.modTalk = 'moderation talk'; pageContext.i18n.replyToComment = 'Reply'; pageContext.i18n.modTalkEmpty = 'moderation talk is empty'; pageContext.url.getModTalk = "/comments/%25ID%25/listModTalk.json"; pageContext.url.possibleCommentRecipients = "/comments/%ID%/possibleRecipients.json"; pageContext.url.commentEdit = '/comments/%25ID%25/edit.html'; pageContext.url.commentView = '/comments/%ID%/view.html'; pageContext.i18n.commentVisibility = { 'full': 'Viewable by all users', 'op': 'Viewable by the original poster', 'mod': 'Viewable by moderators', 'opAndMod': 'Viewable by moderators and the original poster', 'other': 'Advanced visibility', 'dialogTitle': 'Comment visibility', 'selectGroups': 'Visible to groups', 'selectOther': 'Other recipients', 'selectOriginalPoster': 'Original poster', 'selectModerators': 'Moderators', 'selectAssignees': 'Asked to answer users' }; pageContext.i18n.commentMenuLabels = { 'comment-edit': 'comments.menu.edit', 'comment-delete': 'comments.menu.delete', 'comment-convert': 'comments.menu.convert' };pageContext.i18n.answer= { bestAnswer: 'Best Answer', controlBar : { accept: 'Accept', unaccept: 'Unaccept', acceptCommand: 'Accept this answer as correct', cancelAcceptedCommand: 'Remove this answers accepted status' } }; window.croles = { u: false, op: false, m: false, og: false, as: false, ag: false, dc: false, doc: false, eo: false, ea: false }; tools.init({ q: { e: false, ew: false, eo: false, r: false, ro: false, d: false, dow: false, fv: false, c: false, co: false, p: false, tm: false , ms: false, mos: false }, n: { f: false, vf: false, vfo: false, vr: false, vro: false, c: false, co: false, vu: false, vd: false, w: false, wo: false, l: false }, c: { e: false, eo: false, d: false, dow: false, ta: false, tao: false, l: false }, a: { e: false, ew: false, eo: false, d: false, dow: false, a: false, aoq: false, ao: false, tc: false, tco: false, p: false, tm: false }, pc: croles }, { tc: true, nsc: true }); commandUtils.initializeLabels(); }); Skip to Content
0

SAP UI5 Odata Data not coming

Apr 25, 2017 at 08:27 AM

61

avatar image

Dear Experts,

I am using the "proxy/http/services.odata.org/V3/Northwind/Northwind.svc/" for calling .

But it was throwing the error message . and data not displaying in the browser.

Error Message.:

Failed to load resource: the server responded with a status of 501 (Not Implemented) index.html:1 XMLHttpRequest cannot load http://services.odata.org/V3/Northwind/Northwind.svc/Customers?$top=71&$skiptoken=%27ERNSH%27. Response for preflight has invalid HTTP status code 501 sap-ui-core.js:80 2017-04-25 10:32:57 The following problem occurred: HTTP request failed0,, - u @ sap-ui-core.js:80 fatal @ sap-ui-core.js:80 f._handleError @ ODataModel.js:6 j @ ODataModel.js:6 (anonymous) @ ODataModel.js:6 o9 @ datajs.js:17

error.png

Please help me .

Thanks

Punna

error.png (88.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Parth Budhiraja Apr 25, 2017 at 08:57 AM
0

Can you please share your code snippet here?

Share
10 |10000 characters needed characters left characters exceeded
PUNNA RAO Apr 25, 2017 at 10:19 AM
0

ListView.xml

*******************************************

http://www.w3.org/1999/xhtml">

**************************************************

List.controller.js

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

onInit: function() {

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

this.getView().setModel(oModel); // },

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Thanks

Punna

Share
10 |10000 characters needed characters left characters exceeded
Srinivasan S Apr 25, 2017 at 12:36 PM
0

Hi Punna,

Try giving the Service URL only in the ODataModel and set the model. Give the oModel in console to check if the data is coming.

Regards,

Srinivasan

Share
10 |10000 characters needed characters left characters exceeded