Mike Gilbert makes a really good point here about how to use the data objects as return types in XML Web Services.

Recently, I had been trying to come up with a better methodology for allowing these data objects to include "functional" code than what was supported by the classes generated from a WSDL. Since reading this, I've realized that I've been thinking about the problem in the exact wrong way. It's not that I didn't know the tenets of SOA. It was more about forgetting to apply them.

So, that project that I was working on has since been refactored into:

  • A simple data container class with the XML Serialization attributes applied to the class and its members.
  • A class that can handle the basic functionality required to work with that data class.