SMP Kapsel app中applicationContext.applicationEndpointURL

来源:互联网 发布:finalcaption mac下载 编辑:程序博客网 时间:2024/05/16 18:36

例子1:不带Relay Server的例子:
http://www.xxx.springworks.info:8080/com.sap.flight.kepsel

例子2:带Relay Server的例子: https://www.xxx.springworks.info:8443/ias_relay_server/client/rs_client.dll/xxx_smp_dev_farm/com.sap.flight.kepsel

例子代码:

readODataMySQL: function (oTable) {        mymodules.Module1.debug("readODataMySQL called");        var sServiceUrl = applicationContext.applicationEndpointURL + "/IG_MYSQL;v=1/";        var user = applicationContext.registrationContext.user;        var password = applicationContext.registrationContext.password;        var headers = {"X-SMP-APPCID" : applicationContext.applicationConnectionId};        // Create OData model from URL        var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl,                                                       true,                                                       user,                                                       password,                                                       headers);        oTable.setModel(oModel);    },
0 0