Step 1: Generate or Obtain the Web Service WSDLs for Your Organization
To access Metadata API calls, you need a Web Service Description Language (WSDL) file. The WSDL file defines the Web service that is available to you. Your development platform uses this WSDL to generate stub code to access the Web service it defines. You can obtain the WSDL file from your organization’s Salesforce administrator, or if you have access to the WSDL download page in the Salesforce user interface, you can generate it yourself. For more information about WSDL, see http://www.w3.org/TR/wsdl.
Before you can access Metadata API calls, you must authenticate to use the Web service using the login() call, which is defined in the enterprise WSDL and the partner WSDL. Therefore, you must also obtain one of these WSDLs.
The sample code in Step 3: Walk Through the Java Sample Code uses the enterprise WSDL, though the partner WSDL works equally well.
To generate the metadata and enterprise WSDL files for your organization:
- Log in to your Salesforce account. You must log in as an administrator or as a user who has the “Modify All Data” permission.
- From Setup, enter API in the Quick Find box, then select API.
- Click Generate Metadata WSDL, and save the XML WSDL file to your file system.
- Click Generate Enterprise WSDL, and save the XML WSDL file to your file system.