+ Start a Discussion
praccitpraccit 

Enterprise WSDL

Hi, 

( 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.

http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_quickstart_steps.htm

praccitpraccit

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 !

 

Kirill_YunussovKirill_Yunussov
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.