-
29 Aug 2012 6:49 AM #1
Unanswered: Sencha Touch oData Connector for SAP
Unanswered: Sencha Touch oData Connector for SAP
Hi i want to get Data with the oData Connector, but there are always an Error Message:
401 (Unauthorized).
My proxy:
if I try to open the url in the browser, it works with the credentials.HTML Code:proxy: { type: 'odata', url: 'https://url..../odata/_vti_bin/listdata.svc/News', withCredentials: true, username: 'username', password: 'password'
-
31 Aug 2012 6:19 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
Are you also trying to do this cross origin?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
31 Aug 2012 6:44 AM #3
I disabled the web security of google chrome, I don't think this should be the problem.
-
6 Sep 2012 3:17 AM #4
Hi,
I am facing the similar issue. This is an authorization error. But when I open the link in the browser in a different tab by providing the credentials, this error is gone. Unfortunately a new error has popped up(Status code 501). Not sure how to resolve this one.
-
12 Sep 2012 6:45 AM #5
I am encountering the same issue.
Using the error handling from the Flights Unlimited example project, additional error message details were provided: "Logon performed in system ABC, No logon data provided"
Since username and password properties are being provided, I was expecting an invalid logon data message versus a no logon data message and am therefore proceeding with investigating the proxy itself.
Like others, the URL works in Google Chrome with disabled web security and in Firefox with the RESTClient add-on.
-
19 Oct 2012 7:00 AM #6
-
4 Dec 2012 1:39 PM #7
Only works in Browsers not on Simulator or Device
Only works in Browsers not on Simulator or Device
I have been trying for many weeks now and concluded that the SAP OData Proxy works fine in browsers, but does not work in a Simulator or on Device. The error that occurs is a 401 error, which states that the credentials were not given.
After launching Chrome with the following parameters:
open -a "Google Chrome" --args --allow-file-access-from-files --disable-web-security
The SAP OData Proxy will work and the username and password are understood, but when packaging for the Simulator, it does not work.
Has anyone got this working, without the need to remove the authentication from the OData service.
Regards
Dean
-
4 Dec 2012 1:47 PM #8
Hi,
Did you try to include "useHeaderAuthentication: true"? Like so:
Let me know if that works.Code:proxy: { type: 'odata', url: "HTTP://GW.ESWORKPLACE.SAP.COM:80/sap/opu/sdata/iwcnt/activity/ActivityCollection", withCredentials: true, useHeaderAuthentication: true, username: '<yourusername>', password: '<yourpassword>' }
Thanks.
-
4 Dec 2012 2:05 PM #9
Luc,
Perfect, just tried and that did the trick, fantastic, I now have a fully functioning SAP Odata Application using a SAP Hana OData Service on an iOS Device.
Many thanks for your help.
Dean
-
4 Dec 2012 2:08 PM #10
Hi Dean,
Fantastic!
Glad I could help.


Reply With Quote