function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris Berg 6Chris Berg 6 

SOAP API WSDL exposes bug in XmlSerializer dating back to 2009

Hey everyone, 

the enterprise WSDL in the soap API exposes a well-known bug in the XmlSerializer in .NET.  Apparently MS has known about the bug since 2009 and has decided not to fix this.  You can read about it here on this link:  https://connect.microsoft.com/VisualStudio/feedback/details/471297

To work around this, I tweaked the WSDL with a dummy attribute.  Everyone that uses .NET with the Enterprise WSDL is going to hit this problem.  Hoping this helps.

<complexType name="ListViewRecord">
  <sequence>
   <element name="columns" type="tns:ListViewRecordColumn" maxOccurs="unbounded"/>
  </sequence>
  <xsd:attribute name="tmp" type="xsd:string" /> <!--Added by Chris Berg per bug found in XML Serializer-->
</complexType>
 
Cheers!
Daniel BallingerDaniel Ballinger
I had similar issues with both the Partner API (http://www.fishofprey.com/2014/10/importing-salesforce-winter-15-partner.html) and Metadata API (http://www.fishofprey.com/2013/10/importing-salesforce-winter-13-metadata.html).

In my case I was able to alter the generated System.Xml.Serialization.XmlArrayItemAttribute rather than modifying the WSDL.
Chad Saar 8Chad Saar 8
This worked great for me for awhile but now it no longer works with one of my WSDL files. I have re-downloaded and fixed it and it continues to throw the same error. There is more to the story. If it is something Microsoft needs to fix shouldn't SalesForce and Microsoft be talking, why is it being left on the end users?