For the second question: if you have attributes, you need to use XmlSerializer - DataContractSerializer does not support them.
For the first question: yes, it is possible. No, this is not easy. The choice of serializer is done at the operation formatter level. WCF allows you to change the serializer to an operation using [XmlSerializerFormat] or [DataContractFormat] (by default), but this will associate the serializer with both requests and responses.
If you really want to do this, you can create your own formatter (replace it with some operation behavior), and then in this formatting you can choose how you serialize / deserialize the inputs / outputs (you can even use different serializers for each parameter ), but you need to create one formatter, which is not too easy to do.
I wrote a few posts about message formatters and replaced serializers in Silverlight , which can give you a hint on how to get started. But if you can only live with the XmlSerializer, it will be much easier.
source share