Cs0030: Unable to create a temporary class

I have a web service, when I try to generate its object, I get below the error.

"Unable to create a temporary class (result = 1) .error CS0030: Unable to convert the type 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment []' to 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment'error CS0030” Unable to convert the type' ShortSellRegamementmenthtermmentShlstermmentmenthortment LightTermlementmenthortmentlightmenthortmentlightmentmenthtermmentmenthtermmentlightstermmentmenthortmentlightmenthortmentlightlightmentmenthortmentmentlightmentmenthortmentlightlightmentmenthtermmentmenthortmentlightlightmentmentme CS0030: Unable to convert type “ShortSell.ShortSellRQOriginDestinationInformationFlightSegment []” to “ShortSell.ShortSellRQOriginDestinationInformationFlightSegment'error CS0029: Unable to implicitly convert type“ ShortSell.ShortSellortFormationInformationSlightSenseRegSemmentFlightSenseRegSemmentFlightSenseRegameSlightRegameRegination2900 Sell.ShortSellRSOriginDestinationOptionFlightSegment 'to' ShortSell.ShortSellRSOriginDestinationOptionFlightSegment [] 'error CS0029: Unable to implicitly convert type' ShortSell.ShortSellRSOriginDestinationOptionFlightSegment 'to' ShortSell.ShortSellOction}

I tried to change the properties of the temp folder to write, but I still get this error. Why am I getting this error and how to fix it?

+12
c #
Sep 28 2018-11-11T00:
source share
2 answers

This is a known bug that will not be fixed:

The error occurs when a complex type in wsdl contains exactly one element with unlimited occurrence. The workaround taken from this discussion on the forum (thanks to Elena Haritidi) is to add dummy attributes for these types:

<xs:sequence maxOccurs="unbounded"> <xs:element ../> <xs:sequence> <xs:attribute name="tmp" type="xs:string" /> <-- add this 

as well as

 <xs:sequence> <xs:element maxOccurs="unbounded"/> <xs:sequence> <xs:attribute name="tmp" type="xs:string" /> <-- add this 
+24
Sep 28 2018-11-11T00:
source share

There was no "xs: sequence" element in my wdsl, so I could not directly apply the wsdl file change. However, I fixed the problem by referring to the post below.

stack overflow

0
Aug 25 '15 at 10:41
source share



All Articles