How to return an XML document from a Web Service

  • Thread starter Thread starter GH
  • Start date Start date
G

GH

Can someone point me to an example of a VB.Net client that reads an
XML Document from a web service?

I have a web service that successfully creates an XML document, saves
it on the server and returns it to the calling client.

Maybe I don't understand all I know about this but for some reason
what is returned is an XMLNode, not a document. How does one usually
return an XML Document from a web service? SHould I be using
XMLDatadocument?

Thanks,
GH
 
Maybe I don't understand all I know about this but for some reason
what is returned is an XMLNode, not a document. How does one usually
return an XML Document from a web service? SHould I be using
XMLDatadocument?

It's probably best to return the XML as a string - then load it into a XML
document using the LoadXML function.
 
Gh,

You can try this

(everything written in this message and nothign checked.

dim GH as new Dataset("GH")
dim dotnetgod as net DataTable("dotnetogd")
dim dca as new datacolumn("a")
dim dcb as new datacolumn("b")
ds.tables.add(dotnetgod)
dotnetgod.columns.add(dca)
dotnetgod columns.add(dcb)
dt.loaddatarow(new object() {"you","jij"},true)
dt.loaddatarow(new object() {"he","hij"},true)
ds.writexml("c:\mijdata.xml")

have a look at that xml file.

Cor
 
Gh,

You can try this

(everything written in this message and nothign checked.

dim GH as new Dataset("GH")
dim dotnetgod as net DataTable("dotnetogd")
dim dca as new datacolumn("a")
dim dcb as new datacolumn("b")
ds.tables.add(dotnetgod)
dotnetgod.columns.add(dca)
dotnetgod columns.add(dcb)
dt.loaddatarow(new object() {"you","jij"},true)
dt.loaddatarow(new object() {"he","hij"},true)
ds.writexml("c:\mijdata.xml")

have a look at that xml file.

Cor

"GH" <[email protected]> schreef in bericht





- Show quoted text -

Thanks Cor. That worked!

--GH
 
Back
Top