If I want to write a web service and expose it as both WCF and basic SOAP, can my data types use only data contract serialization or do I have to use the XmlSerializer?
Microsoft mentions that the XmlSerializer is required
When creating services that follow the legacy SOAP Encoding standard
which may imply this.
Is there a standard technique for creating data types that can be exposed through all bindings?
You can completely ignore the old XML Serializer if you are creating a new service. Just use Data Contract Serialization and the binding will take care of the rest.