on ‎2020 Aug 05 11:06 PM
Hello, experts. I'm not so experienced in UI5 and decided to use Visual Studio Code to develop a new application. I generated a new project and added a service from my local npl installation. When I tried to run application I encountered the problem of CORS then I run Chrome in a special mode and the mistake was gone. However, the information is still not displayed on the screen and I see a strange error in the console "CSRF token validation failed - sap.ui.model.odata.v2.ODataModel". How can I avoid this mistake?
manifest file
"dataSources": {
"http://vhcalnplci.dummy.nodomain:50000/sap/opu/odata/SAP/ZORDER_SRV/": {
"uri": "http://vhcalnplci.dummy.nodomain:50000/sap/opu/odata/SAP/ZORDER_SRV/",
"type": "OData",
"settings": {
"localUri": "localService/http://vhcalnplci.dummy.nodomain:50000/sap/opu/odata/SAP/ZORDER_SRV//metadata.xml"
}
}
}
"": {
"type": "sap.ui.model.odata.v2.ODataModel",
"settings": {
"defaultOperationMode": "Server",
"defaultBindingMode": "OneWay",
"defaultCountMode": "Inline",
"preload": true
},
"dataSource": "http://vhcalnplci.dummy.nodomain:50000/sap/opu/odata/SAP/ZORDER_SRV/"
}
view.xml
<Page title="{i18n>title}">
<content>
<Page id="Products" title="Available Products">
<content>
<List items="{/zord_warehouse_cds}">
<StandardListItem type="Active" title="{name}" />
</List>
</content>
</Page>
</content>
</Page>

Request clarification before answering.
Hi Fedor,
I have a blog post that talks about how you can use Fiori Tools + UI5 Tooling on VS Code where you can use proxy middleware to proxy out your backend OData service:
https://blogs.sap.com/2020/08/03/sap-fiori-tools-sapui5-freestyle-app
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.