Building a Web Service to Provide Real-Time Stock Quotes:: The Web Service I have written returns real-time stock quotes. There are two functions. nothing special needs to be done on the client side to call the Web http://dotnetjunkies.com/Article/A3E8CA89-9AA1-4C3B-BCC6-901C92A523E9.dcikHOME | Hi,
I'm starting to lose my patience with this and I can't figure out if it's a .net issue or extjs... or just me. 7.3 Invoking a Web Service:: BPEL process waits for the reply, nothing that explicitly receives the reply is needed. The second assign activity returns the response from the web service. http://download.oracle.com/docs/cd/B31017_01/core.1013/b28764/bpel003.htmHOME | How to: Stream Large Amounts of Data from a Web Service:: To improve the performance of an ASP.NET Web service that returns more than 10 MB of data in a SOAP response, the GetSchema Return Nothing End Function http://msdn.microsoft.com/en-us/library/aa528818.aspxHOME |
I make a call to my webservice and the webservice is called as I can step through with the debugger. However my Extjs grid contains no records. If I use a aspx page to return the xml instead of a webservice, it works fine.
Here's the relevant code:
ExtJs:
var ds = new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({
url: 'GetAnalysts.asmx/GetAnalyst',
//url:'GetAnalysts.aspx', //using that would work
method: 'POST'
}),
sortInfo:{field: 'client', direction: "ASC"},
groupField: 'fullname',
reader: new Ext.data.XmlReader({
record: 'analyst'/*,
id: 'analystid'*/},
[
{name:'analystid', type:'int'},
{name:'fullname'},
{name:'clientid', type:'int'},
{name:'client'},
{name:'analysed', type:'int'},
{name:'scrapped', type:'int'},
{name:'languages'}
]) //end reader
}); //end store
var grid = new xg.GridPanel({
store: ds,
.....
My webservice:
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script;
using System.Web.Script.Services;
using System.Xml;
///
/// Summary description for GetAnalysts
///
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class GetAnalysts : System.Web.Services.WebService {
public GetAnalysts () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Xml, UseHttpGet=true)]
public string GetAnalyst() {
try
{
XmlDocument myDoc = new XmlDocument();
myDoc.LoadXml("1Brian Hicks417Dell24554French, English, German, spanish"
+ "1Brian Hicks208Adobe13028French, English, German, spanish"
+ "2Ron Hood417Dell12523French, English"
+ "3Sam Johns125Symantec36080French, English");
return myDoc.InnerXml.ToString();
}
catch (Exception ex)
{
}
return "";
}
}
New to using extjs here, but I think you need to call ds.load() before passing it to the DataGrid.
Do you see any XHR calls being made by the browser?
However nothing is returned or at least the grid contains nothing.
You need to debug with firebug. The above response indicates you don't know if your response came back from the server or what it looks like, much less whether the store got loaded.
ALWAYS setup a store.on('loadexception' handler (for development and production) B)
Snoop it!
Yes I use ds.load, I just haven't post that part of the code. As I said the webservice is called since I can step in. However nothing is returned or at least the grid contains nothing.
What dress should i wear for an interview ?
Financial Representative =Insurance salesman?
|