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
RickKaseyaRickKaseya 

Error Adding Web Reference

I have two salesforce accounts, our production account, and our developer account. When I export the exnterprise.xml file from the developer account and add it to VS 2005 as a web reference all works.

 

When I download the enterprise.xml file from production and add as a web reference it fails with the following error:

The Custom tool MSDiscoCodeGenerator Failed. Unable to import binding "SoapBinding" from namespace "urn:enterprise.soap.sforce.com".

 

 

Any ideas? Why is this failing, I cannot see many differences between the file headers.

 

-rick

ElliotElliot
I am having this same problem. I do not have a developer account, but I am getting that error when trying to download the enterprise.wsdl. The sample code works fine, but as soon as I attempt to download our company's WSDL, I get that exact error message.
AtsConsultingAtsConsulting

That last response was me - I posted under the wrong account. I have tried this in multiple versions of Visual Studio. 2003 and 2008. I had done a previous integration using 2003, so I tried updating that wsdl and got the error. I thought maybe the latest API wasn't compatible with 2003, so I downloaded the latest sample code. I opened that in 2008 and was able to login, but obviously couldn't do anything else because I hadn't downloaded the company WSDL. As soon as I downloaded it, I got that error message.

 

This has to be a simple fix that I'm missing. Can someone help out? 

 

Thanks,

Chris

eric.mcgilleric.mcgill

Here is what I did to resolve this issue, not sure it's correct, but it fixed my problem:

 

1. In the dev enterprise.xml is a section

<complexType name="ApexClass">

 

2. This section does not appear in the production enterprise.xml, however is referenced.

 

3. I copied and pasted the section into the production enterprise.xml and wala, all works.

 

Good Luck!

-Rick

Message Edited by eric.mcgill on 02-03-2009 12:22 PM
AtsConsultingAtsConsulting

Would you be able to post that section? I do not have a development environment, so I have nothing to copy from.

 

 

eric.mcgilleric.mcgill

<complexType name="ApexClass">

<complexContent>

<extension base="ens:sObject">

<sequence>

<element name="ApiVersion" nillable="true" minOccurs="0" type="xsd:double"/>

<element name="Body" nillable="true" minOccurs="0" type="xsd:string"/>

<element name="BodyCrc" nillable="true" minOccurs="0" type="xsd:double"/>

<element name="CreatedBy" nillable="true" minOccurs="0" type="ens:User"/>

<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>

<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>

<element name="IsValid" nillable="true" minOccurs="0" type="xsd:boolean"/>

<element name="LastModifiedBy" nillable="true" minOccurs="0" type="ens:User"/>

<element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>

<element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>

<element name="LengthWithoutComments" nillable="true" minOccurs="0" type="xsd:int"/>

<element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>

<element name="NamespacePrefix" nillable="true" minOccurs="0" type="xsd:string"/>

<element name="Status" nillable="true" minOccurs="0" type="xsd:string"/>

<element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>

</sequence>

</extension>

</complexContent>

</complexType>

SuperfellSuperfell
Hmmm, there shouldn't be any dangling type references in the WSDL, can some post (or email me directly sfell at salesforce.com) an enterprise WSDL that shows this problem.
SuperfellSuperfell
Thanks to everyone that emailed me WSDLs, we've identified the problem and are hoping to have this fixed soon. In the interim you can remove the complexType definition of AsyncApexJob to allow your WSDL to import, sorry for the inconvenience.