wcfwcf-proxy

WCF - Can I generate one proxy from two separate interfaces


I have two separate interfaces and two separate endpoints (.svc files) defined in a single WCF project. These interfaces share common objects in the project. Is there a way to create a single proxy that combines both interfaces and all the objects, since they are shared?

Thanks!


Solution

  • While searching here, I ended up finding another thread (I lost the url) which suggested using the following svc syntax:

    svcutil.exe /ct:System.Collections.Generic.List`1 /ser:Auto /tcv:Version35 /n:*,MyNamespace http://localhost/MyService/Services/Service1.svc?wsdl http://localhost/MyService/Services/Service2.svc?wsdl http://localhost/MyService/Services/Service3.svc?wsdl

    By doing this, I was able to create a single proxy which had three interfaces and three client classes, but all objects that were common in the implementation appeared only once.