hi all,
im just wondering about data contracts to be sent over the wire in WCF communication. i know for the sake of interoperability it is not advisable (maybe not even allowed?) to send native .NET types as part of a data contract.
I wish to have a service which accepts, as an input to a ServiceOperation, a .NET XmlDocument type. If i were to create a wrapper class (that would be marked with DataContract attribute) which holds an XmlDocument type (which would be marked with the DataMember attribute), and use this as the parameter for the ServiceOperation - would this be legal/possible?
How might i ensure interoperability, whilst still having the convenience of the XmlDocument type? Might it be a better design choice to accept a string as the parameter for the ServiceOperation and then instantiate an XmlDocument using the XmlDocument.LoadXml(string) method on the service side?
cheers for any help/views/comments, i'm just starting to get to grips with wcf so i just want to clear up any confusion in my head before i dive head first into creating a service.
THANKS!