I have published xml document through web service like this
<WebMethod()> _
Public Function HelloWorld() As XmlDocument
Dim xmlDoc As New XmlDocument
xmlDoc.Load(AppDomain.CurrentDomain.BaseDirectory & "\Product.xml")
Return xmlDoc
End Function
How do i read this Xml document into xmldocument object from other web service?
I wouldn’t use the XmlDocument as the return type at all. I would suggest simply returning the XML as a string, for instance:
Then, in your client application, you can load the XML string into the XmlDocument object:
But, if you need to keep the method returning an XmlDocument, keep in mind that it is a complex type, so on the client side, it will be represented as a proxy type, not the actual XmlDocument type. So, you would need to create a new XmlDocument and load it from the xml text from the proxy: