Returning typed dataset from a webservice

S

sys

i have a webmethod returning a typed dataset. when i test the webservice in
the browser i saw that the result included the definition of the typed
dataset. is this always the case? i think that the overhead of including the
type definition with every result is not necessary, because the type
definition is only needed when the client proxy is generated. is there a
possibility to have the webservice respond whithout the type definition?
 
J

Jeffrey Hasan

I believe what you are referring to is the infamous DiffGram format that
interop purists love to hate (and with some good reason). But there is an
alternative: you can serialize the DataSet into an XmlDataDocument and
return this instead. This results in a smaller payload and no diffgram
format. And this gives you a lot of flexibility on how the client will
handle the returned data.

Matt Powell has written the definitive article on this subject. Check it out
at:

http://msdn.microsoft.com/webservic...rary/en-us/dnservice/html/service02112003.asp

Jeffrey Hasan, MCSD
President, Bluestone Partners, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top