Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2806

CROSS ORIGIN ISSUE - Improper oData URL format

$
0
0

I am using proxy Servlet(attached below) and one handler(attached below) to resolve Cross origin issue.

Below is the code fragment I am using. But Its giving unexpected oData Url format due to which getting 404 error while reading the entity.

 

var loginId= sap.ui.getCore().byId("__xmlview0--loginId");

//its giving Entity set

var oModel = new sap.ui.model.odata.ODataModel("http://PO server:port num/MyApp/GWProxyServlet?sap/opu/odata/SAP/ZFK_ORD_HEADERDETAILS_SRV/");

 

//i am reading perticular entity

oModel.read("/EmployeeSet(empid='"+id+"')", null, null, false, function(oData){

oLoginJsonModel.setData(oData);

 

// In console unexpected URL format as below

http://PO server:port num/MyApp/GWProxyServlet?EmployeeSet(empid='"+id+"'sap/opu/odata/SAP/ZFK_ORD_HEADERDETAILS_SRV/"

 

Please suggest on this.


Viewing all articles
Browse latest Browse all 2806

Trending Articles



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