Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Dataset question
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00685449
Message ID:
00685558
Views:
21
Cathi,

I'd like to call attention to one little gotcha when passing DataSet objects and that is when passing to and from WebServices. Theoretically, WebServices should only be passing straight XML so that it can be easily consumed by any client. The DataSet's version of XML is not always easily consumed (for example, you can't use it directly in a VFP app (via XMLTOCURSOR()) that calls such a WebService ... you have to actually parse it thru the XMLDOM in order to get a working cursor out of that XML).

However, if a WebService returns MyDataSet.GetXML() instead of just returning MyDataSet, then that returned XML can be consumed by *any* other client, not just with a .NET client. Even though you might think that another client other than .NET would never use your WebService, I just think it's a good habit to get into ... cuz you never know.

~~Bonnie



>The DataSet was built from the ground up to work with XML. The DataSet objects and XML documents are almost interchangeable. It's easy to move from one data structure to the other. This duality allows developers to use the interfaces they're most comfortable with. You can work with the DataSet objects as XML documents.
>
>>If one is passing a dataset through HTTP (say, from a WinForm to a Web Service, or vice-versa), I believe what is actually being passed behind the scenes is XML.
>>
>>Is this also true even when HTTP isn't directly involved? (Say for instance, one middle-tier component function calls another middle-tier component function, and passes a dataset as a parameter...is this also XML?)
>>
>>We're using datasets almost exlusively to pass parameters (since so many of our parameters are variable length and contain lists of keys, etc.), so I was just curious.
>>
>>Thanks,
>>Kevin
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform