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

Enterprise WSDL


( I am new to salesforce )


Trying to create a simple ( sample ) web service app using "Enterprise WSDL" of my free developer's edition. ( ver 24.0)


Strange thing is SFDC Web Services Documentation lists the following import : 


import com.sforce.soap.enterprise.EnterpriseConnection; 

// ( i m using Java 1.6 ) 


but EnterpriseConnection is NOT FOUND in the wsdl ( if i am correct, it should be a complexType in the WSDL ) but it's not there and my eclipse IDE is complaining about it ( import could not be resolved ) All other classes are found 


I have also downloaded WSC 18,19,20 ( tried each of them separately ) but could not find the class there also. 

( I directly imported the jar file downloaded from the wsc web site ) 

I have simply copied the code from salesforce pdf ( Web Services API ) in the project. 


( In another project I was able to work correctly with the Metadata API ( created some custom objects thro api calls ) )


Please help me. 

Thanks a lot in advance ! :)

Jerry HeJerry He

Whether you use wsc.jar to create enterprise.jar file and add it to your java project?

Look at the link, do it and you will create your first web service project.


Thanks a lot Jerry He ! I am grateful to you !  :)


This worked and I could connect to SFDC finally thorugh my web service.


I was just using the wsc-22.jar and not run wsdlc on it initially. that was my mistake :( 


Thanks again !


If you use WSDL2JAVA instead of WSC to generate the Java WSDL files, the EnterpriseConnection class will not be there.    Additionally, make sure to not use Chrome to generate the WSDL from Salesforce - it does not save the file correctly.  Use Firefox or IE instead.