Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Getting error to fetch data even after allowing Allow-Control-Allow-Origin: * - Chrome Web Store

$
0
0

Hi ,

I am trying to run one of the example which i saw in scn.During the execution i got following error .even after allowing allow-control-allow-origin in chrome

browser and Please help me how to overcome cross origin in devlopment envirornment at the same time in production envirornment.

 

XMLHttpRequest cannot load file:///C:/Users/Jagadeesh/Desktop/proxy/http/services.odata.org/Northwind/Northwind.svc/$metadata. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.o.defaultHttpClient.request @ sapui5.hana.ondemand.com/resources/sap/ui/thirdparty/datajs.js:17

 

 

my code for calling service

 

 

var sURI = "proxy/http/services.odata.org/Northwind/Northwind.svc/";

  var oModel = new sap.ui.model.odata.ODataModel(sURI, true);

  var oTileCont = new sap.m.TileContainer("tc",{});

  //Tile Template

  var oTileTmp = new sap.m.StandardTile({

  icon : "sap-icon://menu",

  title : "{CategoryName}",

  info : "{Description}"

  });

  oTileCont.bindAggregation("tiles","/Categories",oTileTmp);


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>