Home SalesforceCertification Difference between Salesforce WSDL Files

Difference between Salesforce WSDL Files

by Dhanik Lal Sahni
Difference between Salesforce WSDL Files - SalesforceCodex

SOAP Integration is done using WSDL file in Salesforce. WSDL (Web Service Description Language) is used to describe functionalities provided by web service.  This WSDL file can be used by any client like .NET, JAVA, Perl to connect with Salesforce system. In Salesforce we can generate below types of WSDL files.

  1. Enterprise WSDL
  2. Partner WDSL
  3. Apex WSDL
  4. Metadata WSDL
  5. Delegate Authentication WSDL

1. Enterprise WSDL:

This WSDL can be used by customer who already using Salesforce system and wants to integrate their Org with other application like .NET, Java. As they will work with their Salesforce org only so we can use Enterprise WSDL. Enterprise WSDL are strongly types means WSDL file has each metadata information like object name (standard and custom objects), field name and their types as well. If any metadata changes will be done in Salesforce organization, then we have to regenerate WSDL file to get those changed information. If we will not re-generate WSDL then we will not get updated metadata information and cannot use that in our client code.

This WSDL is tied to specific Salesforce Org. If we have multiple Salesforce Org, then we have to generate multiple Enterprise WSDL.

Code Example for using object:

Employee__c p = new Employee__c();
p.Name__c=’Hello’;

In this example, we are directly referring Employee__c object and field Name__c.

Used By : This is primarily used by customers.

2. Partner WDSL:

This WSDL document is used by customers, partners, and ISVs who want to build an integration that can work across multiple Salesforce organizations, regardless of their custom objects or fields.  While working with Partner WSDL, we don’t know object and field detail so we have to write our code with more flexibility. Some time, we have to check fields or objects availability before using it.

Partner WSDL can work with multiple Salesforce Org as it is designed for it.

Code Example:

sObject p = new sObject();
p.setType("Position__c");
p.setField("Name", "Test");

In this example we are referring generic sObject and setting type of object and fields later. Before using fields, we have to confirm that field Name is there in Position__c object.

Used By : This is primarily used by partners for making apps.

3. Apex WSDL:

Use this WSDL to run or compile Apex in another environment. For this we kind of requirement, we can also use Tooling API now.

4. Metadata WSDL:

Use this WSDL, when want to use the Metadata API to retrieve or deploy customization information. For this we kind of requirement, we can also use Metadata API now.

5. Delegated Authentication WSDL:

The delegated authentication WSDL document is for users who want to create a delegated authentication application to support single-sign on.

Checkout blog https://salesforcecodex.com/2020/11/configure-saml-single-sign-on-between-two-salesforce-orgs/ for this.

References:

  1. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_steps_import_wsdl.htm
  2. https://help.salesforce.com/articleView?id=dev_wsdl.htm&type=5

You may also like

2 comments

Sai LearnInbox December 22, 2020 - 11:47 am

Great Post. I learnt new things about the salesforce wsdl(web server description language) files and integration .

Reply
Dhanik Lal Sahni December 26, 2020 - 10:41 am

Thank You Sai.

Reply

Leave a Comment