Returning an XDocument from a WCF service in vb.net

  • Thread starter Thread starter sonicm
  • Start date Start date
S

sonicm

Hi,
Has anyone got any examples on how to return a XDocument type back to a
website calling a WCF service? I have spent over a day on this and don't seem
to be getting anywhere, any help would be appreciated?

I have got bogged down in the DataContractSerializer but am unable to find
any exmaples on using this with XDocument in VB.NET?

Thanks in advance.
 
sonicm said:
Has anyone got any examples on how to return a XDocument type back to a
website calling a WCF service? I have spent over a day on this and don't seem
to be getting anywhere, any help would be appreciated?

I am able to return an XElement but not an XDocument.
 
Well i've kind of got it working but it's not a neat solution, if I do a
..ToString() on the return and return it as a string then do a XDocument.Parse
at the other end it does seem to work.

Does seem strange that you can't return a XDocument though as it kind of
puts a dent in LINQ if you a limited but this... ?
 
Back
Top