Error import com.sforce.soap.enterprise

Its a common error in Webservice api.
To avoid this error, you have to use the below syntax to create enterprise.jar.

Code:

java –classpath pathToJAR/wsc-20.jar com.sforce.ws.tools.wsdlc pathToWsdl/WsdlFilename
pathToJar/JarFilename

Example:

java -classpath wsc-20.jar com.sforce.ws.tools.wsdlc enterprise.wsdl.xml enterprise.jar

The above code generates a jar file named 'enterprise'.

You should include this jar file to avoid errors.


Cheers!!!

No comments:

Post a Comment