1

I've started my integration of sales force with third party system but going down the way i have just confused on usage of API's.

  1. When i can write a APEX SOAP or REST class to supply the data to third party system why do i need a partner WSDL (for instance) ?

Just trying to clear my doubt on why do i need a WSDL when i have APEX Web service methods available?

3 Answers 3

3

A WSDL is a specific form of XML. It's also metadata that tells the web service how your data is structured. A WSDL tells the other database how to connect with your and authenticate with it. How to refresh tokens and so forth.

The Partner WSDL is one that's not specific to any one particular Enterprise org that's been customized. It only applies to standard objects that one might expect to encounter. Unlike JSON (REST only), a WSDL uses opening and closing tags for each field; making it more precise and reducing the potential for errors in data transmission.

More than anything, one would want to use a WSDL when connecting with say an Oracle database or any database that's JAVA driven. Those databases use the same data structure and will know how to deal with a WSDL. You might say that you're speaking "their native language" when you send them a WSDL.

3
  • thkx but what when we can expose apex methods as webservices why we need partner wsdl ? what is the difference that counts on it? Jul 15, 2016 at 13:30
  • As I said above, if you're connecting to a JAVA driven database, you're speaking a common language. What type of service to write greatly depends on what the other end can understand. Not all can accept a REST based call. Some may need encryption as well. It also depends on something called "middleware" that may be involved. There isn't a simple answer. SOAP services are the standard. REST is the newer protocol that very popular and especially useful for mobile applications. Not all data servers will support it.
    – crmprogdev
    Jul 15, 2016 at 13:34
  • @PrabhuSethupathy for more, I also recommend you go through the following modules on Trailhead: Apex Integration Services and API Basics.
    – crmprogdev
    Jul 15, 2016 at 13:41
1

Partner WSDL to use to authenticate the other service and will get Session Id in response. Which will they use to make other callouts in Salesforce.

You can also use enterprise WSDL here

The primary differences between the two WSDL that Salesforce provide are

Enterprise WSDL:

a) The Enterprise WSDL is strongly typed.

b) The Enterprise WSDL is tied (bound) to a specific configuration of Salesforce (ie. a specific organization's Salesforce configuration).

c) The Enterprise WSDL changes if modifications (e.g custom fields or custom objects) are made to an organization's Salesforce configuration.

For the reasons outlined above, the Enterprise WSDL is intended primarily for Customers.

Partner WSDL: a) The Partner WSDL is loosely typed.

b) The Partner WSDL can be used to reflect against/interrogate any configuration of Salesforce (ie. any organization's Salesforce configuration).

c) The Partner WSDL is static, and hence does not change if modifications are made to an organization's Salesforce configuration.

2
  • Thnks Tushar, i understand the difference between partner and enterprise but my question is why partner wsdl when we can enabled apex methods as webservice? what difference or adv we have? Jul 15, 2016 at 13:21
  • @PrabhuSethupathy you can use Partner WSDl for authentication and many other methods are inbuilt supported using Partner WSDl. Otherwise you need to write bunch of code manually. Jul 18, 2016 at 4:55
0

WSDL is contract that contains URL or endpoint, method , parameters, parameters datatypes etc.

If your third party do not have this information then they will not be able to call api with right parameters.

WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). WSDL is extensible to allow description of endpoints and their messages regardless of what message formats or network protocols are used to co

https://www.w3.org/TR/wsdl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.