I have an existing WCF service. At some point, sometimes an [OperationContract]
or a [DataMember]
in a data contract becomes [Obsolete]
. I don't want to remove the method, for back-wards compatibility reasons. Another example is sometimes I have an Enum, and want to [Obsolete]
one of the choices, but I can't completely remove it because items already exist in the system / database that contain that value.
Anyway, is there a way to omit certain items from the generated WDSL? For example:
[ServiceContract]
public interface IMyService
{
[OperationContract]
string SomeMethod(string x); // I do want this in the WSDL
[Obsolete]
[OperationContract]
string OldMethod(string x); // I do NOT want this in the WSDL, but I do want it to still work / be callable if an older system tries to call it.
}