D
David Palau
I'm looking for some guidance on what data type would work best as the
result output of a web service function method. This web method will
return an object that implements a class that is generated from the
xsd.exe tool built off a xml schema. I don't know at invocation time
what the exact class will be returned from the call.
Even though this is an internal web service to our company, this web
service will be used by a bevy of clients, not all .Net applications.
Initially this web method was just returning a string that was created
from using XmlSerializer to serialize the object using a XmlWriter
into a MemoryStream and then just using a StreamReader to get to the
actual string.
But I'm wondering if there is a better way to go about this?
I created a version of this web method that return a XmlDocument that
is created from the same MemoryStream object (e.g.
document.Load(stream)). That seems to work as well and seems more
intuitive.
Is there another alternative? XmlNode or XmlDataDocument?
Any gottchas on using one type or the other?
Thanks in advance for any help.
-David
result output of a web service function method. This web method will
return an object that implements a class that is generated from the
xsd.exe tool built off a xml schema. I don't know at invocation time
what the exact class will be returned from the call.
Even though this is an internal web service to our company, this web
service will be used by a bevy of clients, not all .Net applications.
Initially this web method was just returning a string that was created
from using XmlSerializer to serialize the object using a XmlWriter
into a MemoryStream and then just using a StreamReader to get to the
actual string.
But I'm wondering if there is a better way to go about this?
I created a version of this web method that return a XmlDocument that
is created from the same MemoryStream object (e.g.
document.Load(stream)). That seems to work as well and seems more
intuitive.
Is there another alternative? XmlNode or XmlDataDocument?
Any gottchas on using one type or the other?
Thanks in advance for any help.
-David