I have a WCF Service (with servicecontracts, datacontracts, etc) , like this:
[ServiceContract(Namespace = "http://company.com/MyCompany.Services.MyProduct")]
public interface IService
{
[OperationContract]
CompositeType GetData();
}
[DataContract(Namespace = "http://company.com/MyCompany.Services.MyProduct")]
public class CompositeType
{
// Whatever
}
If I want to use the service in a client, I think there are two options:
- use Service Reference (use WDSL) to URL Publish of WCF Service;
- use Assembly Reference to assembly contains Interfaces, Contracts, DataContracts classes.
I use .NET to .NET scenarios in 90%.
Which is the best way? which the advantages of each other?