讓SAP雲平臺上的Web應用使用destination服務
阿新 • • 發佈:2018-05-12
sta entry neo ui5 acc DC alt span PE
首先在SAP雲平臺裏創建一個destination,維護service的end point:
然後打開SAP雲平臺的WebIDE,創建一個新的文件夾和新的HTML5 Application Descriptor:
將下列內容粘貼到neo-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": "/distance" ,
"target": {
"type": "destination",
"name": "google_map"
},
"description": "Google map"
}
]
}
新建一個index.html, 輸入以下內容:
<a href="distance/xml?origins=Walldorf&destinations=Paris">
Distance from Walldorf to Paris:</a>
測試該應用,點擊超鏈接:
會發現第一步創建的destination已經生效了。
要獲取更多Jerry的原創技術文章,請關註公眾號"汪子熙"或者掃描下面二維碼:
讓SAP雲平臺上的Web應用使用destination服務