C# : WCF Service with IXMLSerializable member turns into DataSet
.net, c#, dataset, ixmlserializable, wcf
Solution
In general, custom serialization (via `IXmlSerializable`) over either SOAP or WCF is a bad idea. If you are using assembly-sharing with WCF (i.e. rather than proxy generation, you ship the DTO assembly to the client) then it can work, but it still violates SOA/mex etc. Actually, I'm surprised it doesn't just give you `XmlElement` or similar, but heh!
I would simply map your existing (`IXmlSerializable`) object model into simple types that can use the standard serialization (i.e. no `IXmlSerializable`).
BTW; have you looked at ADO.NET Data Services? This already handles `Expression` over the wire (although not as a value). For passing as values, MetaLinq.
Problem
.NET I have a web service, one of the data members of a message implements IXmlSerializable, when I do "Add Service Reference" that member becomes a DataSet. I am trying to pass a serialized `Expression<TDelegate>` as a parameter to the web service. Q: How do I make a `DataSet` out of the `IXmlSerializable` instance on the client side?