Saturday 31 August 2013

How to consume web services in Sencha Touch 2.2

How to consume web services in Sencha Touch 2.2

am new to Sencha Touch. I tried to consume web service but its keeps
saying "Unable to load data using the supplied configuration.Open in
Browser". My store is
Ext.define('MyApp.store.MyJsonPStore', {
extend: 'Ext.data.Store',
requires: [
'MyApp.model.MyModel'
],
config: {
autoLoad: true,
model: 'MyApp.model.MyModel',
storeId: 'MyJsonPStore',
proxy: {
type: 'jsonp',
url: 'http://api.twitter.com/1/statuses/public_timeline.json',
reader: {
type: 'json',
rootProperty: 'errors'
}
}
}
});
and my model is
Ext.define('MyApp.model.MyModel', {
extend: 'Ext.data.Model',
config: {
fields: [
{
name: 'message'
},
{
name: 'code'
}
]
}
});
Thanks for your help in advance.

No comments:

Post a Comment