[I just read your answer and realized that you are specifically setting parameters for the service methods. I will leave my comments here if they are still useful.]
What I did in projects where I know that I have WCF on both sides of the wire, there is something like:
The library is only for common interfaces, for example:
namespace SharedInterfaces { public interface ICompositeType { bool BoolValue { get; set; } string StringValue { get; set; } } }
WCF Services Library, where [DataContract] s (POCOs) implement common interfaces.
[DataContract] public class CompositeType : ICompositeType { bool boolValue = true; string stringValue = "Hello "; [DataMember] public bool BoolValue { get { return boolValue; } set { boolValue = value; } } [DataMember] public string StringValue { get { return stringValue; } set { stringValue = value; } } }
In the service client, each POCO proxy server may be βforcedβ to implement a common, deployed interface using a partial class (in any case, if svcutil did this correctly), and you can program the interface in the rest of your client code:
namespace ServiceClient.ServiceReference1 { public partial class CompositeType : ICompositeType { } }
This partial is also useful if you want to add some additional properties or methods that the client can use (for example, Presenter or ViewModel concepts in MVP or MVVM templates).
lesscode
source share