Newer Version Available

This content describes an older version of this product. View Latest

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 either obtain the WSDL file from your organization’s Salesforce administrator, or you can generate it yourself if you have access to the WSDL download page in the Salesforce user interface. 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.

Any user with the “Modify All Data” permission can download the WSDL file to integrate and extend the Salesforce platform. (The System Administrator profile has this permission.)

If a user requires access to metadata but not to data, you can enable the Modify Metadata permission (beta) to give the access the user needs without providing access to org data.

Note

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:

  1. Log in to your Salesforce account. You must log in as an administrator or as a user who has the “Modify All Data” permission.
  2. From Setup, enter API in the Quick Find box, then select API.
  3. Click Generate Metadata WSDL and save the XML WSDL file to your file system.
  4. Click Generate Enterprise WSDL and save the XML WSDL file to your file system.