24/01/2012 - Have added an update at the bottom of this article today, as it turns out that for Simple Enumerations this is not required by the DataContractSerializer.
In order to pass Enum values around to your WCF service operations, then you must put [ServiceKnownType(typeof(Enum))] attribute on the service interface contract, and also add the [EnumMember] attribute to every enum value within your Enumeration data contract.
Service contract looks like this...
[ServiceContract(Namespace = "http://MyNameSpace.ServiceContracts/2007/04", Name = "IReferenceData", SessionMode = SessionMode.Allowed)]
public interface IReferenceData
[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "LookupReferenceData")]
MyNameSpace.DataContracts.ReferenceValueCollectionData LookupReferenceData(MyNameSpace.DataContracts.ReferenceTypeData request);
Enum looks like this...
/// Data Contract Class - ReferenceTypeData
[DataContract(Namespace = "http://MyNameSpace.DataContracts/2007/04", Name = "ReferenceTypeData")]
public enum ReferenceTypeData
Unknown = 0,
Title = 1,
Nationality = 2
Have just found an article that suggests for Simple enumerations this attribute decoration for EnumMember and DataContract attributes is implicit.
See the Simple Enumerations section on this msdn artcile here
You can also serialize enumeration types to which the DataContractAttribute attribute has not been applied. Such enumeration types are treated exactly as previously described, except that every member (that does not have theNonSerializedAttribute attribute applied) is treated as if the EnumMemberAttribute attribute has been applied.
Notes on Simple Enumerations
Applying the EnumMemberAttribute attribute to simple enumerations has no effect.
It makes no difference whether or not the SerializableAttribute attribute is applied to the enumeration.
The fact that the DataContractSerializer class honors the NonSerializedAttribute attribute applied to enumeration members is different from the behavior of the BinaryFormatter and the SoapFormatter. Both of those serializers ignore the NonSerializedAttribute attribute.