on 08-11-2015 6:29 PM
First I tested that my POST to C4C would work from a browser rest client, to ensure the backend service is working correctly:
Then I created an OData model in SAPUI5 (in the console), pointing to my C4C OData service, and refresh the security token. I check that the CSRF-Token has been retrieved:
I now attempt to create (POST) the data in the console:
this fails, with error around the CSRF token (example below, should match CSRF token above, but was taken from a different attempt):
Has anyone experienced this before? nomatter how often i refresh the CSRF token it fails..but I think the error text might be wrong, as there is no reason why the token is not working...
Thank you in advance for any help.
Hi Lindsay,
It could be because in your REST client you are calling the proper service which is HTTPS, and then in your localhost proxy server it is only HTTP.
Thanks
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
John, you're a star! This was exactly the reason
For others: I reattempted this test, by running my localhost on https (https://localhost:443) and this now works!
I have since testing this on HCP (HANA Cloud Platform) and it works perfectly (HCP is on HTTPS already)
Thank you John!
Hi Lindsay,
I hope you have two way binding enabled for the model as below:
oModel.setDefaultBindingMode(sap.ui.model.BindingMode.TwoWay);
Also you have put in the binding syntax to complex in index.html
data-sap.ui.xx-bindingSyntax="complex"
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.