C# web service client query

gchadha

Newcomer
Joined
Mar 3, 2008
Messages
3
Hi,

I need some help regarding a web services client that I am coding in C# .NET. The web service returns a dataset from a database table as System.XML.XMLElement over SOAP. In the client code, I stored the result in a variable of type System.XML.XMLElement, and convert it to a dataset but it doesen't show any rows returned whereas I can see data getting returned in the packet trace. Here's how I am trying:

System.Xml.XmlElement resultCode; resultCode = GwareWebInt.ReadIVRConfiguration(locationID);
System.Xml.XmlNodeReader xnr = new XmlNodeReader(resultCode);
DataSet ds = new DataSet();
ds.ReadXml(xnr);
DataTable dt = ds.Tables["CFGDATA"];

It'll be great if you could provide any helpful pointers.


Thanks,
gc
 
Yes, it contains the database schema XML. But not the XML with the real data which is sent after the schema XML.

thanks,
gc
 
Is it necessary to use .NET remoting to pass datasets around? We are not using remoting so just wanted to make sure if it can work without it.

thanks,
gc
 
There is no need to use remoting, data sets work just fine with web services.

If you have access to the server can you check the data is being returned from the web method correctly. Also, if the web service returns a dataset is there a reason you are returning it as a normal element rather than as a dataset?
 
Back
Top