> I have a C# Web Service that some of the methods (ones that return integers)
> work and some do not (the ones that return a DataView.
[quoted text clipped - 37 lines]
>
> Line 92:
RequestNamespace="http://www.NAMfg.com/NAMfgWebServices/NotificationsAndAler
ts/",
ResponseNamespace="http://www.NAMfg.com/NAMfgWebServices/NotificationsAndAle
rts/",
> Use=System.Web.Services.Description.SoapBindingUse.Literal,
> ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[quoted text clipped - 5 lines]
>
> I need some help here. Pulling my hair out trying to figure out what to do.
Hi Kevin,
The short story is that you cannot return a DataView from a WebMethod
because a DataView is not XML serializable (for more information, read
http://support.microsoft.com/default.aspx?scid=kb;en-us;306134 and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conxmlserializationwithwebservices.asp).
Instead of a DataView, you will need to return something that can be
serialized to XML, e.g., a DataSet or an array of custom objects.
Regards,
Sami
Grigs - 28 Sep 2004 15:03 GMT
Understood. Well, I am dealing with it at least.
Thank you, what I have done to get around the issue was when I returned a
DataSet that always worked. However, my initial DataSet has 5 tables in it.
I have adjusted the WS to now create an empty DataSet and add new DataTable
and I fill in the values and return that.
Works like a champ, thanks again,
Kevin