cancel
Showing results for 
Search instead for 
Did you mean: 

OpenUI5 unauthorized issue using with WDB IDE 160324

VenugopalA
Explorer
0 Kudos
106

Hi experts,

Am in a process to create & run simple UI5 application from SAP WEB IDE [ i.e. version 160324 ] to move forward I have completed below activities,

Before starting am trying to explain all my process setup, here there you have 3 areas to configure

  1. SAP HANA Cloud Connector
    1. As of now we are using only on premise systems
    2. all are showing green indication
    3. while check am getting status is connected, I can able to view my Tunnel ID, Local Name & Local IP
    4. access control à for on premise system access same has been mapped with virtual and internal system
    5. added resource accessible for above added system.
  2. SAP HANA Cloud Platform Cockpit
    1. Destinations are created and am able to get successful pings for on premise systems [ i.e. check Connection ]
    2. At connectivity status green & Exposed backend system are visible
  3. WED IDE using trail version
    1. From SAP WEB IDE while creating any new project I can able to select system from above created destinations
    2. I can able to access respected OData service

  1. Till here, setup part has been completed, hope fully I have done correctly.
  2. Now the issue is while creating a simple UI5 application, which contains only to pass the value as EMP id and trying to get EMPNAME & EMPMOBILE NUMBER.
  3. Before that I have created OData service, same has been tested with metadata & entity Set for both are working fine, i.e. I can able view metadata & while passing any EMP ID I can bale view EMP Name & EMP Mobile Number from Gateway client & XML [ URL running from browser ]
  4. For above action I have taken one input and button at WEB IDE & added model at button event and passing the hardcoded emp number

var domainString = "document.domain";

var domainstring = "*.com";

'Access-Control-Allow-Origin: *.local.com';

'Access-Control-Allow-Headers: X-KEY';

var sServiceUrl = "https://xxxx.xx.xxx:443/sap/opu/odata/sap/Zxxxxx_xxxxx_SRV/";

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

var oJsonModel = new sap.ui.model.json.JSONModel();

var gServiceUser = "xxxx";

var gServicePassword = "xxxx123";

             oModel.read("/ZPARCEL_OwnerSet('3000001190')", gServiceUser, gServicePassword ,true,function(oData,repsonse){

  oJsonModel.setData(oData);

  var empbp = oData.BpId;

               MessageToast.show("Employee Name is" + empbp);

}):

As per my above code I was expecting to get empbp, but am getting below error, respected experts please provide your input.

In advance appreciate your help and time.

Regards,

             Sid.

Accepted Solutions (1)

Accepted Solutions (1)

VenugopalA
Explorer
0 Kudos

Hi experts,

issue got resolved .... by adding below function

function (data, response)

        {header_xcsrf_token = response.headers['x-csrf-token'];

Answers (0)