我試圖使用NorthWind R/W oData服務鏈接http://services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/作爲proxy/http/services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc
這對本地測試工作正常。NorthWind o數據服務不工作
現在,當我想它FTP到我的域名,它不工作...
給錯誤原樣
"NetworkError: 404 Not Found -
http://{mydomain}/proxy/http/services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/$metadata
「
再次,如果我不使用代理像 - http://services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/
給出的錯誤爲-
"NetworkError: 501 Not Implemented -
http://services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/$metadata"
代碼:
onInit: function() {
var oModel = new sap.ui.model.odata.ODataModel("http://services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/");
oModel.oHeaders = {
"DataServiceVersion": "3.0",
"MaxDataServiceVersion": "3.0"
}
sap.ui.getCore().setModel(oModel,"products");
}
你能給我們一些你的代碼嗎? –
增加了一些代碼@Osamah Aldoaiss –