-
11 Dec 2011 7:26 AM #11
Oh, man. I resave your code. now is :
and it's working with xmlCode:var tweetsStore = new Ext.data.Store({ model : 'Tweet', autoLoad: true, proxy: { type: 'ajax', url: SF.proxy('http://api.twitter.com/1/statuses/public_timeline.xml'), reader: { type: 'xml', root: 'statuses', record : 'status' } }, });
http://senchafiddle.com/#IBdE4
-
11 Dec 2011 7:28 AM #12
First Point:
When you call load right after store creation, there is huge probability that the controllers or views are not yet loaded resulting into errors. I can prove it and have proved it with my link.
Second Point:
No twitter isn't GOD and can legitimately be wrong. I tested this myself and I am not just throwing words in the air. Try to copy twitter's response XML into your newly created file and save it and then try to call it via AJAX.
I tried to help you here. Please don't make me think I was wrong.
-
11 Dec 2011 7:30 AM #13
You're right. It's working with XML now. Sorry for the second point. My tests were also right so. I am glad if it helped you.
-
11 Dec 2011 7:45 AM #14
ok. i see, the problem is in the cross-domain. how i can hack this on my own machine and will i have some kind of problems if i run application on the real phone?
-
11 Dec 2011 7:50 AM #15
I don't think it's cross domain problem. On chrome this is the problem though but in iOS and other smartphones there is no need to care about this because there are no such restrictions. It will work fine without this function SF.proxy().
-
11 Dec 2011 8:21 AM #16
hm...then, i will get some virtual machine with IOS becouse http://senchafiddle.com is very unstable(unfortunately)
-
11 Dec 2011 8:24 AM #17
Yes it's newly developed but not that buggy. I couldn't follow you at VM for iOS.
-
30 Apr 2012 4:18 AM #18
Hi,
I am also facing same problem.
Please help me out, if you are done with the problem...
I am exhausted of the same since a week's time.
I have a view "Xblist.js" with following code
The store "IStore.js" looks like thisCode:{ xtype: 'list', id: 'mylst', itemTpl: '{tname}', store: { autoload: true, storeId: 'MStore', model: 'Sencha.model.Main', scripttagproxy: { type: 'ajax', url: 'http://www.abc.com/xml/c.php?d=2', reader: { type: 'xml', record: 'item', rootProperty: 'root' } } },
While accessing web service through store,I am getting an error likeCode:Ext.define('Sencha.store.IStore', { extend: 'Ext.data.Store', config: { autoLoad: true, storeId: 'IStore', model: 'Sencha.model.Items', proxy: { type: 'scripttag', url: 'http://www.abc.com/xml/c.php?d=2', reader: { type: 'xml', record: 'itemlevel0', rootProperty: 'root' } }, filters: [{ property: 'itid' //value: '1288' }] } });
' unexpected token < ' c.php 1
Is it possible to access cross domain while using sencha touch with chrome?
If yes then how to access Web Service throuh url?
I have tried url: SF.proxy('http://abc.xml') also but for that I am getting an error SF is undefined.Do i need to install Sencha Fiddle on my machine?
Is there any alternative without using Sencha Fiddle?
Please help me out.
I hope you will help me.
Thanks in advance,
NB
-
18 Oct 2012 12:25 PM #19
Hi...facing same issue Reading XML Error: Unexpected token <
Hi...facing same issue Reading XML Error: Unexpected token <
Hi,
I'm facing same issue.
Accessing http request on cross-domain, and that why using proxy type as jsonp.
With this I'm getting error as follows.
Reading XML Error: Unexpected token<my Store:
config: {
autoLoad: true,
model:'myModel',
storeId:'storeID',
proxy: {
type:'jsonp',
url:'http://domain.com',
reader: {
type:'xml',
rootProperty:'rootProperty' }
}
},
Please note that, XML repsonse from server does contain data with CDATA tag
Ex:
<city>
<![CDATA[CityName]]>
</city>
Not sure, error I get is due to a limitation on reader type "xml"
Please help
Thanks in advance...


Reply With Quote