Release Notes
Prerequisites to Build Client Applications
Step 1: Generate or Obtain the Web Service WSDLs for Your Organization
Step 2: Import the WSDL Files Into Your Development Platform
Step 3: Walk Through the Java Sample Code
Previous Versions
Once you have the WSDL files, import them into your development platform so that your development environment can generate the necessary objects for use in building client Web service applications. This section provides sample instructions for WSC. For instructions about other development platforms, see your platform’s product documentation.
The process for importing WSDL files is identical for the metadata and enterprise WSDL files.
Note
Java environments access the API through Java objects that serve as proxies for their server-side counterparts. Before using the API, you must first generate these objects from your organization’s WSDL file.
Each SOAP client has its own tool for this process. For WSC, use the wsdlc utility.
Before you run wsdlc, you must have the WSC JAR file installed on your system and referenced in your classpath. You can download the latest force-wsc JAR file and its dependencies (dependencies are listed on the page when you select a version) from mvnrepository.com/artifact/com.force.api/force-wsc/.
Note
The basic syntax for wsdlc is:
1java -classpath PATH_TO_WSC;PATH_TO_WSC_DEPENDENCIES com.sforce.ws.tools.wsdlc PATH_TO_WSDL/WSDL_FILENAME PATH_TO_OUTPUT_JAR/OUTPUT_JAR_FILENAMEOn Windows:
1java –classpath force-wsc-30.0.0.jar;ST4-4.0.7.jar;antlr-runtime-3.5.jar com.sforce.ws.tools.wsdlc metadata.wsdl metadata.jarOn Mac OS X and Unix, use a colon instead of a semicolon in between items in the classpath:
1java –classpath force-wsc-30.0.0.jar:ST4-4.0.7.jar:antlr-runtime-3.5.jar com.sforce.ws.tools.wsdlc metadata.wsdl metadata.jarwsdlc generates a JAR file and Java source code and bytecode files for use in creating client applications. Repeat this process for the enterprise WSDL to create an enterprise.JAR file.