Duplicate: serializing-generic-xml-data-across-wcf-web-service-requests
Hi all,
I have a WCF service where Im building up a block of XML using an XmlWriter. Once complete I want to have the WCF return it as an XmlDocument.
But if I have XmlDocument in the [OperationContract] it doesnt work:
[OperationContract] XmlDocument GetNextLetter();
The WCF test utility gives:
System.Runtime.Serialization.InvalidDataContractException: Type 'System.Xml.XmlDocument' cannot be serialized.
Thanks in advance!