我有一个Web服务,当我尝试生成它的对象时,我遇到了错误.
"无法生成临时类(result = 1).error CS0030:无法将类型'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment []'转换为'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment'error CS0030:无法将类型'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment []'转换为'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment '错误CS0030:无法将类型'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment []'转换为'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment'error CS0029:无法将类型'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment'隐式转换为'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment []'错误CS0029:无法隐式转换类型'ShortSell. ShortSellRSOriginDestinationOptionFlightSegment'to'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment []'error CS0029:无法将类型'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment'隐式转换为' ShortSell.ShortSellRSOriginDestinationOptionFlightSegment []'"}
我尝试将临时文件夹属性更改为可写但我仍然收到此错误.为什么我会收到此错误,如何解决?
Hei*_*nzi 23
这是一个无法修复的已知错误:
当wsdl中的复杂类型恰好包含一个具有无限发生的元素时,会发生错误.从这个论坛讨论(信用到Elena Kharitidi)获取的解决方法是为这些类型添加虚拟属性:
<xs:sequence maxOccurs="unbounded">
<xs:element ../>
<xs:sequence>
<xs:attribute name="tmp" type="xs:string" /> <-- add this
Run Code Online (Sandbox Code Playgroud)
和
<xs:sequence>
<xs:element maxOccurs="unbounded"/>
<xs:sequence>
<xs:attribute name="tmp" type="xs:string" /> <-- add this
Run Code Online (Sandbox Code Playgroud)