代理生成问题-枚举定义两次生成 [英] Proxy generation issue - Enum Definations getting generated twice

查看:84
本文介绍了代理生成问题-枚举定义两次生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从WSDL文件生成代理类.我正在.Net Fwk 4.0下使用svcutil生成代理类.

I want to generate a proxy class from an WSDL file. I am using svcutil under .Net Fwk 4.0 to generate proxy class.

但是,生成的代理类正在创建一个枚举(状态枚举)两次.

One Staus enum defination is having XMLTypeAttribute and other enum is having DataContractAttribute over their respective definations.

我在google上搜索并发现帖子说这是由于使用了默认的序列化程序,即自动,因此我为svcutil提供了/Serializer:XmlSerailizer选项,但仍然 结果相同.

I googled around this and found posts saying this is due to default serializer used which is Auto, so I provided the /Serializer:XmlSerailizer option to the svcutil but still the same result.

我也尝试使用datacontract序列化程序,但没有用.

I also tried using datacontract serializer but no use.

Kinldy,让我知道如何避免上述情况.

Kinldy, let me know how can I avoid the above situation.

令人惊讶的是,当我将WSDL文件托管在本地服务器上并使用在VS 2010中,代理没有两个枚举定义.

我想知道,VS2010在幕后使用了什么选项来仅生成一个枚举定义,而不是以前的两个.

PS:依赖的XSD之一具有定义格式状态枚举和服务WSDL具有一种复杂类型,该类型又引用了依赖者中的状态枚举 XSD.

PS: One of the dependent XSD is having defination form status enum and the service WSDL is having one complex type which is turn has reference to the status enum in the depedent XSD.

问候,

Sachin R. Chavan.

Sachin R. Chavan.

Sachin R. Chavan.

推荐答案

感谢您的信息.

我正在尝试让熟悉此主题的人进一步研究这个问题.可能会有一些时间延迟.感谢您的耐心.

I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

最好的问候.


这篇关于代理生成问题-枚举定义两次生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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