Skip to Content

Username and Password are not working in ODATA Model

Hi all,

I've ran into a small issue with my SAPUI5 code. I've created a very simple SAP NetWeaver Gateway service and I am able to test this via restclient (in chrome or via the application).

Now when I do the following in my sapui5 controller

showSecondPage: function() {var oAppData = sap.ui.getCore().getModel("app").getData();var oModel = new sap.ui.model.odata.ODataModel(oAppData.BaseURL, false, "user", "password");sap.ui.getCore().setModel(oModel);

In the developers tool (Network section) i see that the $metadata call is formatted this way:

<user>:<password>@server:port/sap/opu/odata/sap/<GW_SERVICE>/$metadata

And the response for this call is the login-form from SAP. It should not ask Credentials again,

The thing is when i open another tab in chrome and go manually to the metadata url and log in there it just works.

@panneels.robin

I have seen your post

https://archive.sap.com/discussions/thread/3472302

Can you provide solution.

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 26, 2017 at 03:27 PM
    Add comment
    10|10000 characters needed characters exceeded