on 11-03-2015 7:15 AM
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.
try "/EmployeSet("+id.toString()+")" // without empid= inside the parenthesis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wierd, that you have such an error in Console. Try to escape your path, e.g.
var sURI = "/EmployeeSet(empid='"+id+"')";
var sPath = escape(sURI);
oModel.read(sPath, null, null, false, function(oData){
...
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
its not work Vladimirs Semikins
its not catch issue i check it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohd,
It could be a catch issue.
Thanks,
KA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.