SAP WebIDE OData下拉菜單裡的Destination從哪裡來的

我今天做開發遇到一個問題:


我有trial和正式的SAP Cloud Platform賬號各一個:


其中trial賬號的webIDE連接到productive的CloudFoundry:

SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


productive賬號的WebIDE也連接到productive的CloudFoundry:

SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


我發現在我新建OData服務時,從Service url的下拉菜單裡,選擇不到我在SAP雲平臺裡創建的Destination.


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


怎麼感覺trial WebIDE取的Destination來自trial neo環境創建的?


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的

而productive的WebIDE,system下拉菜單裡的Destination也來自productive Neo環境的Destination.


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


似乎CloudFoundry環境的Destination根本沒有被考慮。


再檢查我使用的webIDE的url.


trial:


https://webidecp-i042416trial.dispatcher.hanatrial.ondemand.com/


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的

後來發現了一個github issue:

https://github.com/SAPDocuments/Tutorials/issues/3398

得知如果在SAP WebIDE裡創建UI5應用,需要用Destination連結第三方服務時,需要在Neo環境裡創建Destination,而不是在CloudFoundry環境裡。


為了驗證,我再次在Neo環境裡創建一個Destination:

SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


然後果然在WebIDE裡看到了這個創建於Neo環境的Destination.


WebIDE Preferences裡維護的CloudFoundry endpoint只是開發好的UI5應用部署的目的地。


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


那麼問題又來了,既然這個UI5應用最終部署在SAP雲平臺的CloudFoundry環境下,如果CloudFoundry環境沒有對應的Destination,運行時的表現是怎樣的?


經過我實際測試,發現取不到OData服務的metadata,報500 Internal Server Error的錯誤。


SAP WebIDE OData下拉菜單裡的Destination從哪裡來的

於是我把Neo環境裡創建的Destination導出,再倒入到CloudFoundry環境,這次發現OData metadata終於能夠成功返回了:

SAP WebIDE OData下拉菜單裡的Destination從哪裡來的


分享到:


相關文章: