使用svcutil.exe生成的类型作为Web服务的返回值 [英] Use svcutil.exe generated type as return value for webservice

查看:95
本文介绍了使用svcutil.exe生成的类型作为Web服务的返回值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在使用svcutil生成的类型作为Web服务的返回值时遇到了一些麻烦.我遇到以下情况:客户端调用一个Web服务(A),而另一个Web服务(B).这是因为这2个Web服务位于ipv6域中,而客户端不是必需的.我也想在第一个Web服务(A)上进行一些集中日志记录.

当我尝试使用从Web服务B的wsdl中使用svcutil.exe生成的类型作为Web服务AI中的调用的返回值时出现以下错误:
'System.ComponentModel.PropertyChangedEventHandler'无法从特殊类'System.MulticastDelegate'派生

有没有一种方法可以生成可作为svcutil的返回类型使用的类?从客户端发送到ws A以及从ws A到ws B的类型将始终相同,因此我宁愿不要在ws A中创建新类,这些新类包含与svcutil frim ws B生成的类完全相同的类型,并每次更新

Hi,

I'm experiencing some trouble using a svcutil generated type as a return value from a webservice. I have the following situation: a client calls a webservice (A) that calls another webservice (B). This is because the 2 webservices are in an ipv6 domain and the client not nescessary is. Also I want to do some central logging on the first webservice (A).

When I try to use the types generated with svcutil.exe from the wsdl from webservice B as return values for calls in webservice A I get the following error:
'System.ComponentModel.PropertyChangedEventHandler' cannot derive from special class 'System.MulticastDelegate'

Is there a way to generate classes that ARE usable as return types with svcutil? The types send from the client to ws A and from ws A to ws B will ALWAYS be the same so I rather not create new classes in ws A that contain exactly the same types as the classes generated with svcutil frim ws B and update them every time the wsdl of ws B changes.

推荐答案

http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/fb4658c4-fbc7-4328-b4d8-40e84d36895a


这篇关于使用svcutil.exe生成的类型作为Web服务的返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆