Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to pass a table of data
Message
From
08/12/2004 09:36:37
 
 
To
08/12/2004 06:06:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
00967555
Message ID:
00967722
Views:
7
Cetin,

Even though my application is a .NET app, my Web Services are written in such a way (passing XML strings rather than DataSets) that they can be consumed by non-.NET applications. This just makes good business sense. You can never be 100% that the server-side functionality of your app will only ever be needed by a .NET client ... especially with commercially-sold software, but it can also apply to in-house software too. So why restrict yourself to passing DataSets when it is really quite easy to return MyDataSet.GetXml() from your Web Service.

~~Bonnie


>Funny I could point you to the same article interpreting it as why to return a dataset.
>Here the consumer is .NET. Even if that wasn't .NET still gets a well constructed XML. Anyway at least I'm not an XML expert and wouldn't try to construct my own XML.
>Cetin
>
>>Here is good article on why not to return DataSet from a webmethod.
>>
>>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/html/service02112003.asp
>>
>>
>>>Bonnie,
>>>What's the difference? Passing a dataset you're already passing an XML,no?
>>>Cetin
>>>
>>>>Stephen,
>>>>
>>>>I don't recommend passing a DataSet to or from a WebService. Use an XML string instead. It's easy enough to serialize/deserialize a DataSet to/from XML.
>>>>
>>>>~~Bonnie
>>>>
>>>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform