Refactor your service contracts to exposes two endpoints, the interface of which is only relevant to the client that is consuming it:
[ServiceContract]
public interface IService1
{
[OperationContract]
void OperationOne();
}
[ServiceContract]
public interface IService2
{
[OperationContract]
void OperationTwo();
}
public class MyServcie: IService1, IService2
{
//Implementation here...
}
This way the client of IService1
doesn't even know that the methods on IService2
exist.
This is not restricted to WCF - this is good practice in OOP too....