In the process of learning WCF.
To examplify, lets say I have 3 assemblies :
1.) Service.Contract : It has the definition of the interface MyType IMyInterface();
2.) Service : It has the implementation of the interface MyType MyService() : IMyInterface;
3.) Client : It calls the service.
My basic question is should ‘Service.Contract’ project be exposed to the ‘Client’ project as it needs to know the prototype of the interface. If yes, is it not against the SOA principles ? If no, then how do we achieve a call to the Service with just the endpoint address ?
The general method is you add a service reference to your project which create client based classes which implement the published data contracts and client calling functions to your service. You don’t in actuality use the interfaces which define the services or the classes which define your data contracts.