Difference between Enterprise and Partner wsdl in Salesforce

Enterprise WSDL
Partner WSDL
Strongly typed, the object and its attributes are fixed.
Is loosely typed, the object and its attributes can be variable.
Contains the metadata about all standard and custom fields and objects.
Does not contain metadata about objects and fields. Takes an array of key-value pairs.
Can only be used against your Salesforce instance.
Can be used against many Salesforce.com organizations.

Partner WSDL is more flexibility than enterprise WSDL. Methods use sObject superclass rather than specific classes. Application handles fields as arrays of name-value pairs.

Enterprise WSDL Example:
Position__c p = new Position__c();

Partner WSDL Example:
sObject p = new sObject();
p.setField("Name", "Test");

Check the below link for more info



1 comment:

  1. this will help while connecting or integration