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.
- Enterprise WSDL
- Partner WDSL
- Apex WSDL
- Metadata WSDL
- 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();
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.
sObject p = new sObject();
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.