Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing DataSet across Web Service
Message
From
11/10/2003 16:12:18
 
 
To
All
General information
Forum:
ASP.NET
Category:
Web Services
Title:
Passing DataSet across Web Service
Miscellaneous
Thread ID:
00837848
Message ID:
00837848
Views:
80
A Web Service of mine always sent data thru XML string. So, at the other side, the client was manipulating the data as desired.

For a first test, from the client side, I simply grabbed the XML string data and converted it to a DataSet such as:
Dim loData As DataSet
loData = New DataSet

lcXML = loUT.GetForum()
ImportXML(loData, lcXML)

DataGrid.DataSource = loData
DataGrid.DataMember = "Temp"
So, at this point, the XML string returned from the Web Service is converted into a DataSet and the DataGrid is now bound to it. The data appears and all is ok.

Now, as I don't want the client to have to convert the data, I want to return a DataSet directly. So, for specific clients, I have added a new method to respond to that specific format. So, basically, the change on the client side is now limited to that:
Dim loData As DataSet
loData = New DataSet

loData = loUT.GetForumDataSet()

DataGrid.DataSource = loData
DataGrid.DataMember = "Temp"
However, the Web Service need to be updated. So, I added a new method called GetForumDataSet() which is defined as this:
<WebMethod()> _
Public Function GetForumDataSet() As DataSet

   ' Get the XML string as before
   lcHtml=...

   ' However, in this method, we will now convert it into a DataSet
   Dim loData As DataSet
   loData=ImportXML(loData, lcHtml)
   Return loData
End Function
However, this doesn't work. Is there something I need to adjust on the Web Service or on the client side?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform