Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > returning XML data from sqxml webservice

Thread Tools

returning XML data from sqxml webservice

Posts: n/a
I want to get a DataSet returned from my SqlXml webservice using a
The storedproc returns a simple "Select * from Customers"

The method below connects to the service and its suppose to return a

When i first ran it i got an error :- "Cannot cast Type Dataset to Object"

So i found a solution using this
which apparently its a bug.

So i looked into my webservice "reference.cs" file and changed my spCustomer
method to

public System.Data.DataSet spCustomers() {
object[] results = this.Invoke("spCustomers", new object[0]);
return ((System.Data.DataSet)(results[0]));
and the error disspeared.

public void getXmlWebserivceData()

TestWebService.devpc1.soap mysoapservice = new devpc1.soap();
mysoapservice.Credentials =

ds = (DataSet)mysoapservice.spCustomers();
DataGrid1.DataSource = ds;


The thing is if i configure SqlXml to return a single Dataset using
storedproc. it works fine but i have another template that executes a
storedproc but returns XML
I keep getting error

"For non-array types, you may use the following attributes: XmlAttribute,
XmlText, XmlElement, or XmlAnyElement. "

Any ideas?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning a XML from webservice Ronchese ASP .Net 1 12-18-2006 10:05 PM
returning none when it should be returning a list? Python 11 05-02-2006 10:26 AM
need help returning webservice data in arraylist... Milsnips ASP .Net Web Services 3 09-23-2004 05:00 PM
WebService – Returning an Object Karuppasamy ASP .Net 0 01-15-2004 04:38 PM
Need help returning data from a webservice please Molalla Attenborough ASP .Net Web Services 7 12-31-2003 07:12 PM