want to how to access web service using scripttag
Hi all,
I know how to access web service that returns xml using script tag. I have tried using JSON web service.
Whether we can do in same manner, or what is the other approach.
It will be much help ful if any one post how to access external webservice.
My code as follows
Ext.setup({
onReady : function () {
Ext.regModel('login', {
fields: [
{name: 'id'},
{name:'name'}
]
});
myStore=new Ext.data.Store({
model: 'login',
proxy: {
type: 'scripttag',
url: 'http://www.2beinfluenced.com/sencha/app/myxml.xml',
method: 'GET' ,
//callbackParam: 'jsonp',
reader: {
type: 'xml',
root: 'myXML',
record:'user'
}
},
autoLoad:true
});
new Ext.Panel({
fullscreen: true,
items:[
{
id: "post-list",
xtype : 'list',
style: "border-right: thick solid #000",
store : myStore,
itemTpl : '{id}'
}
]
})
}
});
In my console I see the following errors
Resource interpreted as Script but transferred with MIME type text/xml.
myxml.xml:1Uncaught SyntaxError: Unexpected token <