Salesforce Enterprise WSDL Error in .Net – Unable to generate a temporary class (result=1)

“Unable to generate a temporary class (result=1)” is returned when .Net integration tries to parse the Enterprise WSDL version 32.0
In Winter ’15 (API version 32.0), a number of additional sObjects are available including ListViewRecord, whose definition is as follows:

<complextype name="ListViewRecord">
    <sequence>
        <element maxoccurs="unbounded" name="columns" type="tns:ListViewRecordColumn"></element>
    </sequence>
</complextype>

Here is the solution:

Change above xml to below format:

<complextype name="ListViewRecord">
    <sequence>
        <element maxoccurs="unbounded" name="columns" type="tns:ListViewRecordColumn"></element>
    </sequence>
<xsd:attribute name="tmp" type="xsd:string"></xsd:attribute>
</complextype>

As a result .Net integration fail due to a bug in .NET’s XmlSerializer as described in the following links: https://connect.microsoft.com/VisualStudio/feedback/details/471297

download

Leave a Reply