SAPUI5:为什么我无法访问ES4的数据?

时间:2017-08-13 16:49:18

标签: sapui5

为什么会发生这种情况,我该如何解决?

我从hanatrial.ondemand.com获取数据时遇到问题,我不断收到身份验证警报:  enter image description here

继承人我的目的地conf: enter image description here

并且是我的conf文件:

新app.json

{
"welcomeFile": "index.html",
"routes": [{
    "path": "/resources",
    "target": {
        "type": "service",
        "name": "sapui5",
        "entryPath": "/resources"
    },
    "description": "SAPUI5 Resources"
}, {
    "path": "/test-resources",
    "target": {
        "type": "service",
        "name": "sapui5",
        "entryPath": "/test-resources"
    },
    "description": "SAPUI5 Test Resources"
}, {
    "path": "/destinations/ES4",
    "target": {
        "type": "destination",
        "name": "ES4"
    },
    "description": "ES4 Demo Service"
}
]

}

menifest.json

{
"_version": "1.3.0",

"sap.app": {
    "_version": "1.3.0",
    "id": "opensap.myapp",
    "type": "application",
    "title": "{{appTitle}}",
    "description": "{{appDescription}}",
    "applicationVersion": {
        "version": "1.0.0"
    },

    "dataSources": {
        "ES4": {
            "uri": "/destinations/ES4/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/",
            "type": "OData",
            "settings": {
                "odataVersion": "2.0"
            }
        }
    },
    "i18n": "i18n/i18n.properties"
},
"sap.ui": {
    "_version": "1.3.0",
    "technology": "UI5",
    "deviceTypes": {
        "desktop": true,
        "tablet": true,
        "phone": true
    },
    "supportedThemes": [
        "sap_bluecrystal"
    ]
},
"sap.ui5": {
    "_version": "1.2.0",
    "rootView": {
        "viewName": "opensap.myapp.view.App",
        "type": "XML",
        "id": "app"
    },
    "autoPrefixId": true,
    "dependencies": {
        "minUI5Version": "1.34",
        "libs": {
            "sap.ui.core": {
                "minVersion": "1.34.0"
            },
            "sap.m": {
                "minVersion": "1.34.0"
            },
            "sap.ui.layout": {
                "minVersion": "1.34.0"
            }
        }
    },
    "contentDensities": {
        "compact": true,
        "cozy": true
    },
    "models": {
        "": {
            "dataSource": "ES4"
        },
        "i18n": {
            "type": "sap.ui.model.resource.ResourceModel",
            "settings": {
                "bundleName": "opensap.myapp.i18n.i18n"
            }
        },
        "address": {
            "type": "sap.ui.model.json.JSONModel",
            "uri": "model/Address.json"
        },
        "helloPanel": {
            "type": "sap.ui.model.json.JSONModel",
            "uri": "model/HelloPanel.json"
        }
    }
}

}

为什么会发生这种情况,我该如何解决?

这是我应该检索数据的文件,但仍然没有成功: https://sapes4.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/ $元数据

那我怎么解决这个问题呢?

2 个答案:

答案 0 :(得分:0)

看起来目的地中的用户或pw是错误的。在目的地配置中使用与访问相同的凭据: https://sapes4.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/ $元数据

答案 1 :(得分:0)

该对话框供您提供ES4的系统凭据。但是,您可以通过将其添加到SAP Cloud平台的目标中来消除它。

尽管如此,系统ES4不再处于活动状态,您只需创建用户即可将ES5用于示例Odata。 https://sapes5.sapdevcenter.com/sap/opu/odata/iwbep/GWSAMPLE_BASIC/