开发者

What options are there for exposing a WCF service to multiple internal service consumers?

开发者 https://www.devze.com 2023-03-05 00:00 出处:网络
I have a WCF service to be used by multiple .NET consumers. All development is done with VS2010, and although I currently have an application consuming the service, I don\'t like how VS2010 \'helps\'

I have a WCF service to be used by multiple .NET consumers.

All development is done with VS2010, and although I currently have an application consuming the service, I don't like how VS2010 'helps' you connect to WCF services.

The problem that I'm having is that if you add a service reference in VS2010, it separates types on different endpoints into different namespaces even if they're the same type on the server.

Example: I have a service with 3 endpoints: end1, end2, end3 The endpoints all share a type my.server.type.SomeType

When I hav开发者_如何学Goe VS2010 build service references for endpoints end1, end2, and end3 it creates proxy classes in different namespaces for SomeType

What options are there other than distributing a DLL (which I'm fine with)? And if I do go down that road, should it be the minimal DLL of signatures and types, or abstract out more functionality into an API?

Mark


This can be resolved my using svcutil.exe and specify multiple endpoints it will give you a ton of warnings but the generated classes work and are common across endpoints.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号