I'm creating a Java WS Client (Salesforce Partner WSDL) and following the Salesforce "Setting Up Your Java Developer Environment" document. It recommends installing the Web Services Connector (WSDL-Based APIs) and generate Java Stub Files by using this command

java –classpath path to WSC jar/WSC jar filename
com.sforce.ws.tools.wsdlc path to WSDL/WSDL filename path to
output stub jar and filename

Is this the correct way to create the web client or is there another way?


There are fairly detailed examples on getting up and running from Java in the SOAP API Developer Guide.

In particular, you want:

These show importing your resulting jar for the WSDL and establishing a session.

See also:

  1. Setting Up Your Java Developer Environment
  2. Trailhead - API Basics - Use SOAP API
  • 1
    Thanks Daniel! I actually got this working. Had to create the java stub file for the partner wsdl and that did the trick!(developer.salesforce.com/docs/…) Although, one item in the instruction need to be careful about; copy the tools.jar to the location of you wsdl; pointing the JDK folder didn't work
    – user20719
    Sep 28 '17 at 17:19
  • Glad to hear that you got it sorted. Sep 28 '17 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.