Public Class Service
Implements IService
Public Function PassDataSet( _
ByVal sXMLSchema As String _
, ByVal sXML As String) As Boolean Implements IService.PassDataSet
Dim dsObjects As New Data.DataSet
'First read the schema of the DataSet
dsObjects.ReadXmlSchema _
(New MemoryStream(Text.Encoding.Unicode.GetBytes(sXMLSchema)))
'Then read the data itself
dsObjects.ReadXml _
(New MemoryStream(Text.Encoding.Unicode.GetBytes(sXML)))
'Here do what ever you like with your DataSet
'Finally return a value to the client
Return True
End Function
End Class
'Create and instance of the client proxy for the service.
Dim proxy As New ServiceClient()
Dim dsDataSet As New DataSet()
'Here load your data in your DataSet
'Finally call the service
proxy.PassDataSet(dsDataSet.GetXmlSchema(), dsDataSet.GetXml())
Labels: .NET Framework 3.5, DataSet, WCF