if you are shipping a DataSet, then ship a dataset !!
<WebMethod()> _
Public Function VerifySku(ByVal skus As DataSet) As DataSet
Dim cartSet As DataSet
cartSet = ws.VerifySku(cartSet)
if you want an XmlDataDocument, then ship an XmlDataDocument !!
<WebMethod()> _
Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet
Dim cartSet As DataSet
Dim MyDoc As System.Xml.XmlDataDocument
MyDoc= new System.Xml.XmlDataDocument(cartSet);
cartSet = ws.VerifySku(MyDoc)
-Dino
"Arne" <Ar**@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
How do I pass a dataset to a webservices? I need to submit a shoppingcart
from a pocket PC to a webservice.
What is the right datatype?
II have tried dataset as a datatype, but I can't get it to compile.
<WebMethod()> _
Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet
Test program :
Dim cartSet As DataSet
cartSet = ws.VerifySku(cartSet)
Error:
C:\Projects\ShoppingCartWeb\ShoppingCartTest\Test. vb(37): Value of type
'System.Data.DataSet' cannot be converted to '1-dimensional array of
System.Object'.