Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Passing an xmldocument to a web service


Message #1 by "Ian Bambury - JASWW" <email.address@v...> on Fri, 20 Dec 2002 17:19:59 -0000
Any idea how to do this?

I can pass an xmldocument object to a sub in the same project, no problem, as in:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim xdoc As New XmlDocument()

Dim webr As New localhost.Test()

xdoc.Load("D:\email_example.xml")

Label1.Text = Ret(xdoc)

End Sub

Private Function Ret(ByVal XmlDoc As XmlDocument) As String

Ret = XmlDoc.OuterXml

End Function



but when I try using "Label1.Text = webr.Send(xdoc)" to send it to

<WebMethod()> Public Function Send(ByVal XmlDoc As XmlDocument) As String

Send = XmlDoc.OuterXml

End Function

I get an error "System.InvalidOperationException ... Additional Information: There was an errorgenerating the XML document"



Any ideas?




  Return to Index