![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | SVCUtil Reference and Duplicate Classes I am having issue with svcutil, references and the classes it generates. I have two service contracts that implement some of the same classes in their results that I want the proxy code to share. The source files it outputs no matter what I try keeps putting the same class in all of the files. For what it is worth, the class that is being placed in every proxy is based off of the Generic List. All of the other classes replicated across the contracts are filtered out. It is just this one class, in the same namespace as all of the other classes filtered. Here is the command: Svcutil /r: com.digitalbp.common.dll http://localhost:8083/UserService?wsdl This runs and output a UserService.cs class with this code inline (cut/paste): namespace com.digitalbp.common { using System.Runtime.Serialization; [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] [System.Runtime.Serialization.CollectionDataContractAttribute(ItemName="Error")] public class ErrorCollection : System.Collections.Generic.List<com.digitalbp.common.Error> { } } There are a number of other classes defined in com.digitalbp.common that are not included. Namely as you see above the Error class. Any ideas? |
| | #2 (permalink) |
| Guest | Re: SVCUtil Reference and Duplicate Classes Thus wrote joe.osowski@gmail.com, > I am having issue with svcutil, references and the classes it > generates. I have two service contracts that implement some of the > same classes in their results that I want the proxy code to share. > The source files it outputs no matter what I try keeps putting the > same class in all of the files. > > For what it is worth, the class that is being placed in every proxy is > based off of the Generic List. All of the other classes replicated > across the contracts are filtered out. It is just this one class, in > the same namespace as all of the other classes filtered. [...] Do you need to use generated proxies at all? For type sharing scenarios, I'd rather go with ChannelFactory<T>. Cheers, -- Joerg Jooss news-reply@joergjooss.de |
| | #3 (permalink) |
| Guest | Re: SVCUtil Reference and Duplicate Classes Thanks, but I don't believe that is relevant to the bug I am seeing. Be it a proxy or a ChannelFactory, I can't compile as the typed generic class is duplicated in multiple classes. Joerg Jooss wrote: > Thus wrote joe.osowski@gmail.com, > > > I am having issue with svcutil, references and the classes it > > generates. I have two service contracts that implement some of the > > same classes in their results that I want the proxy code to share. > > The source files it outputs no matter what I try keeps putting the > > same class in all of the files. > > > > For what it is worth, the class that is being placed in every proxy is > > based off of the Generic List. All of the other classes replicated > > across the contracts are filtered out. It is just this one class, in > > the same namespace as all of the other classes filtered. > [...] > > Do you need to use generated proxies at all? > > For type sharing scenarios, I'd rather go with ChannelFactory<T>. > > Cheers, > -- > Joerg Jooss > news-reply@joergjooss.de |
| | #4 (permalink) |
| Guest | Re: SVCUtil Reference and Duplicate Classes Thus wrote joe.osowski@gmail.com, > Thanks, but I don't believe that is relevant to the bug I am seeing. > Be it a proxy or a ChannelFactory, I can't compile as the typed > generic > class is duplicated in multiple classes. You missed the type sharing part of my answer. There will be no generated code if you use ChannelFactory<T> *and* a shared contract assembly, if that's acceptable in your case. Cheers, -- Joerg Jooss news-reply@joergjooss.de |
| |
| |