Skip to Content
2
Jul 04, 2012 at 08:56 AM

Access denied Error for sap-ui-core.js in IE8 !

466 Views

Hi All

I am developing a SAPUI5 application hosted on a local installation (localhost) of Tomcat server, trying to display all the sales order from the SAP ES Workplace ERP system using the SAP Demo Gateway services provided...

I am using the following REST service to fetch all Sales Order - http://gw.esworkplace.sap.com/sap/opu/odata/sap/SALESORDERS/SOHeaders

My HTML5 application is running on the local host..But when I try to run this on IE8, gives me a Access denied

But the sap-ui-core.js is indeed placed under the location mentioned above..If I write a simple application which only display some text, the same code works.

Here is the HTML code I have written

<!DOCTYPE html><html>    <head>        <meta http-equiv='X-UA-Compatible' content='IE=edge' />        <title>Fetch Sales Order via Gateway - SAPUI5</title>        <script id="sap-ui-bootstrap"           type="text/javascript"           src="../sapui5/resources/sap-ui-core.js"           data-sap-ui-theme="sap_goldreflection"           data-sap-ui-libs="sap.ui.commons, sap.ui.table">           document.domain = '*.sap.com'        </script>        <script src="scripts/fetchsalesorder_new.js"></script>     </head>    <body class="sapUiBody">    <div id="salesorders"></div>        <div id="lineitems"></div>    </body></html>

And the snippet of the script file

//supress the Same Origin Policy on IE8 & Chromevar domainString = "document.domain";domainstring = "*.com"'Access-Control-Allow-Origin: *.sap.com''Access-Control-Allow-Headers: X-KEY'var ODataModel = sap.ui.model.odata.ODataModelvar salesOrderService =         "http://gw.esworkplace.sap.com/sap/opu/odata/sap/SALESORDERS/SOHeaders", username = "GW@ESW",   password = "ESW4GW",oModel = new sap.ui.model.odata.ODataModel("http://gw.esworkplace.sap.com/sap/opu/odata/sap/SALESORDERS/SOHeaders")asJson = false,salesOrderCollection = "SOHeader";var salesDetailsTable = new sap.ui.table.DataTable({   title : "Available Sales Order",   width : "100%",   visibleRowCount : 5,   ExpandedVisibleRowCount : 20,   selectionMode : sap.ui.table.SelectionMode.Single,   editable : false  });// connect the data table to the SalesOrder servicesalesDetailsTable.setModel(oModel);salesDetailsTable.bindRows("SOHeader");//place table at the div elementsalesDetailsTable.placeAt("salesorders");

What could be the issue here??

Appreciate any help.

Regards

Sandip

Attachments

pastedImage_0.png (21.8 kB)