SvcUtil generating bad proxies against interface extending generic interface
We have several empty service interfaces (one per service) which ALL extend a base interface that uses generics (interface foo<T>).
We can generate the proxy just fine for 1 service, but when we try to bulk generate for all our services that extend the base generic service things go haywire... one service proxy will generate with return types for other services, etc.
Anyone have experience with this problem? We are trying out the /r switch and the merge switch to add them to an exisitng dll in a batch one by one to hopefully avoid the problem since one at a time works, but we would prefer to execute it all in one shot.
Any thoughts?
Thanks!
Greg
[697 byte] By [
GMan6] at [2008-1-4]
It sounds like your workaround suggestion (generate one-by-one and use /r and /mergeConfig) will work, if anything will.
That said, can you describe a simple repro in more detail? It sound like maybe something like
IBase<T>
IDerived1 : IBase<int>
IDerived2: IBase<string>
S1: IDerived1
S2: IDerived2
might be the essence of the simplest case that reproduces this problem, can you post the details of the contracts for a simple repro along these lines?
This is example is exactly what we are talking about.
There is actually a little more to it but I dont think it affects the scenario:
Since the services in question are basic CRUD services, we created a base class that implements IServiceBase<T> the S1Service and S2Service inherit from. Therefore our services are empty until a user wants to add custom functionality for that service.
IServiceBase<T>
IService1 : IServiceBase<S1Contract>
IService2: IServiceBase<S2Contract>
ServiceBase<T,U>:IServiceBase<T>
Service1: ServiceBase<S1Contract, int>, implements IService1
Service2: ServiceBase<S2Contract, string>, implements IService2
We have this setup to defined a common interface and base implementation for all services in the IServiceBase and ServiceBase (common CRUD functionality). Then customization for the individual services is done by modidfying their own respective interfaces and service.
The the contracts are very simple objects with just primitive type properties on them.
If you want a fully functional reproduceable example, I can throw it together it will just take me a little while, is that what you need or can you respond based on this information?
Again the problem is when we bulk gen the proxies with SvcUtil, Service1 contract types are returned from Service2 Proxy along with other problems like this...
I have created a simple project that reproduces the problem, it is too much to post in a thread, can we take this offline to an email? What email can I send you the project at? If not email is not an option I can post here, but it will be veryyyy long...