I would like to populate a grid with an array of type T where that array is the result of a call to a SOAP webservice. I tried ScriptTagProxy and HttPProxy to no avail. The grid itself shows ok but no data shows up. The webmethod is like foo[] getFoos() and works ok and does produce a non empty result set but how do I connect that to Ext.data.Store so that it shows in the grid? btw, a foo is just a string, I just call it bar.
Script code is like this:
Ext.onReady(function(){
var ds = new Ext.data.Store({
proxy: new Ext.data.ScriptTagProxy({url:
'local web service with with a foo[] getFoos() method'
}),
reader: new Ext.data.ArrayReader({}, [
{name: 'bar', type: 'string'}
])
});
var cm = new Ext.grid.ColumnModel([
{header: "Bar", width: 120, dataIndex: 'bar'}
]);
cm.defaultSortable = true;
var grid = new Ext.grid.Grid('grid-example', {
ds: ds,
cm: cm
});
grid.render();
In order to call a webservice, you need to be able to pass the method name and parms with the request - you can't just make a GET/POST request to an URL. You either have to build SOAP messages or if your server supports invoking a WS by doing something like myurl.com?method=getParms&arg1=foo&arg2=bar (.Net might allow something like this), you have to pass everything after the '?' as params.
But I've not been able to get mine to play nice with that type of url. It gives me Request format is unrecognized for URL unexpectedly ending in '/FunctionName'.
Does anybody know what I'm doing wrong, or how to fix this? Thanks!
Add that to the <system.web> section and it will enable HttpGet and HttpPost methods of accessing your web service. At that point, the Grid binding worked perfectly!
through my search how to use ExtJs to deal with Soap-Requests i found your threat here at this forum.
It seems that you've successfully solved your problem and i want to ask you if it is possible to get a clean example from you how to setup ExtJs-DataStore to deal directly with Soap!
The main thing of interesset for me is, how the DataStorage will invoke the remote function, send the parameters and handles the response.
Maybe if there are some links with tutorials this would help me also!
through my search how to use ExtJs to deal with Soap-Requests i found your threat here at this forum.
It seems that you've successfully solved your problem and i want to ask you if it is possible to get a clean example from you how to setup ExtJs-DataStore to deal directly with Soap!
The main thing of interesset for me is, how the DataStorage will invoke the remote function, send the parameters and handles the response.
Maybe if there are some links with tutorials this would help me also!
Thanx in advance
Udo
two years later, anyway, i need this too, i didn't find anything that really works, this is ext 1.0 forum, anyone still read it?