{"id":187,"date":"2020-09-11T12:18:28","date_gmt":"2020-09-11T10:18:28","guid":{"rendered":"https:\/\/transferttexei.wordpress.com\/2021\/08\/11\/salesforce-and-wsdl-a-soap-opera\/"},"modified":"2024-04-17T16:45:46","modified_gmt":"2024-04-17T14:45:46","slug":"salesforce-and-wsdl-a-soap-opera","status":"publish","type":"post","link":"https:\/\/texei.com\/en\/advices\/salesforce-and-wsdl-a-soap-opera\/","title":{"rendered":"Salesforce and WSDL\u00a0: a SOAP opera"},"content":{"rendered":"\r\n<h2>Introduction<\/h2>\r\n<p>The <a href=\"https:\/\/en.wikipedia.org\/wiki\/SOAP\" target=\"_blank\" rel=\"noopener\">SOAP protocol<\/a> is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs. Using it in a client application can prove difficult if one has no deep knowledge about how the protocol works and how to build the requests. That\u2019s why Salesforce provides us with a file including all the information we need to communicate with an org using SOAP : that\u2019s where the WSDL comes in.<\/p>\r\n\r\n\r\n\r\n<p>The <strong>WSDL<\/strong> (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Web_Services_Description_Language\" target=\"_blank\" rel=\"noopener\">Web Service Description Language<\/a>) is a language used to contain the information necessary to interact with a given Web Service (WS). It is a XML-based standard that is widely used to create WS clients in different programming languages. In Salesforce, it is useful to create a client that will be able to make calls to the standard <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/sforce_api_quickstart_intro.htm\" target=\"_blank\" rel=\"noopener\"><strong>SOAP API<\/strong><\/a>.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">What are the WSDL files\u00a0?<\/h2>\r\n\r\n\r\n\r\n<p>As explained before, the WSDLs are files that are useful to create a client of the Salesforce SOAP API. It is generated by an org and consumed by a client to generate a code that serves as a proxy between the client app and Salesforce. There are different types of WSDL that Salesforce offers : the <strong>Partner<\/strong> and <strong>Enterprise<\/strong> WSDL are used to retrieve and edit Salesforce data like Account via the SOAP API. While the <strong>Metadata<\/strong> and <strong>Tooling<\/strong> WSDL are used to call respectively the <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_meta.meta\/api_meta\/meta_intro.htm\" target=\"_blank\" rel=\"noopener\">Metadata<\/a> and <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_tooling.meta\/api_tooling\/intro_api_tooling.htm\" target=\"_blank\" rel=\"noopener\">Tooling<\/a> APIs useful to deploy metadata or develop Salesforce IDE apps.<\/p>\r\n\r\n\r\n\r\n<p><strong>In this article : <\/strong><\/p>\r\n<ul>\r\n<li>We are going to focus on the <strong>Partner<\/strong> and <strong>Enterprise<\/strong> WSDLs, as the topic is not about metadata deployment but data modifications. As put in the <a href=\"https:\/\/help.salesforce.com\/articleView?id=000325670&amp;language=en_US&amp;type=1&amp;mode=1\" target=\"_blank\" rel=\"noopener\">documentation<\/a>, the Partner WSDL is loosely typed and static. While the Enterprise WSDL is strongly typed and tied to a specific Salesforce configuration.<\/li>\r\n<li>We will see later what that means by seeing how each of these files are used in the context of a client app with some concrete examples.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The WSDL files are accessible in any Salesforce org, in the setup under <strong>Integration<\/strong> -&gt; <strong>API<\/strong>. Here can be found <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/sforce_api_partner.htm\" target=\"_blank\" rel=\"noopener\">different links<\/a> corresponding to the different WSDL files available, including the Partner and Enterprise.<\/p>\r\n\r\n\r\n\r\n<p>It is to be noted that WSDL can also be used in the other way to create <strong>Apex class as client of external Web Services<\/strong>. This is done in the setup under Custom code -&gt; Apex classes by clicking the \u201cGenerate from WSDL\u201d button, as explained <a href=\"https:\/\/trailhead.salesforce.com\/en\/content\/learn\/modules\/apex_integration_services\/apex_integration_soap_callouts\" target=\"_blank\" rel=\"noopener\">here<\/a> and using the WSDL provided by the external service.<\/p>\r\n<p>This will create a proxy code in Apex that can be used to make external calls to the WS.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>Client project\u00a0setup<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>Before going in the details of the WSDL and how to use them, let\u2019s first set up the client project that will make the API calls.<\/p>\r\n<p>Here we\u2019ll create a Java project using the Eclipse IDE, but any other IDE and language works as well.<\/p>\r\n\r\n\r\n\r\n<h4><strong>We need two files<\/strong> :<\/h4>\r\n<p>The WSDL (Partner or Enterprise, in the next examples we use the Partner) that can be generated in the org as explained above, and the WSC (<strong>Web Service Connector<\/strong>). It can be found <a href=\"https:\/\/mvnrepository.com\/artifact\/com.force.api\/force-wsc\" target=\"_blank\" rel=\"noopener\">here<\/a> as explained in the <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_asynch.meta\/api_asynch\/asynch_api_code_set_up_client.htm\" target=\"_blank\" rel=\"noopener\">Salesforce documentation<\/a> or in the <a href=\"https:\/\/github.com\/forcedotcom\/wsc\" target=\"_blank\" rel=\"noopener\">Git repository<\/a>.<\/p>\r\n<p>This file is important when converting the WSDL into Java classes. It contains valuable code as well to connect to your org (among other things as well).<\/p>\r\n<p>Then, we <strong>compile the stub code <\/strong>using both WSDL and WSC files with the command provided in the <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.salesforce_developer_environment_tipsheet.meta\/salesforce_developer_environment_tipsheet\/salesforce_developer_environment_java_stubs.htm\" target=\"_blank\" rel=\"noopener\">documentation<\/a> (this example uses the Partner WSDL but the same procedure applies with the Enterprise one) :<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>java -classpath pathToJar\\force-wsc-XX.X.X-uber.jar com.sforce.ws.tools.wsdlc pathToWSDL\\wsdlFilename .\\wsdlGenFiles.jar<\/code><\/pre>\r\n\r\n\r\n\r\n<p>This generates a file (in our example <code>wsdlGenFiles.jar<\/code>) that is a library containing the proxy code that allows the interaction with Salesforce. All we need to do then is to <strong>reference<\/strong> both the WSDL and WSC libraries in the project (for instance, a <a href=\"https:\/\/enterpriseforcearchitect.com\/2012\/11\/27\/using-the-force-com-web-services-connector-to-access-the-salesforce-com-api\/\" target=\"_blank\" rel=\"noopener\">Build path<\/a> in Eclipse) and <strong>import<\/strong> them before any class with :<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code><strong>import<\/strong> com.sforce.ws.*;<br \/><strong>import<\/strong> com.sforce.soap.partner.*;<br \/><strong>import<\/strong> com.sforce.soap.partner.sobject.*;<\/code><\/pre>\r\n\r\n\r\n\r\n<p>After we have generated and linked the Salesforce libraries to our project, we can analyze further the purpose of each one.<\/p>\r\n<p>There is the <code>force-wsc-49.3.0-uber.jar<\/code> library that contains, among other things, the classes necessary to initiate a connection to an org.<\/p>\r\n<p>The other library is partner.jar that contains the classes to interact with the SOAP API.<\/p>\r\n<p>So the main package (<code>com.sforce.soap.partner<\/code>) contains the classes and methods to send instructions to an org.<\/p>\r\n<p>And the <code>com.sforce.soap.partner.fault<\/code> package contains various classes including the ones necessary for error handling.<\/p>\r\n<p>Finally the last package (<code>com.sforce.soap.partner.sobject<\/code>) is where the main difference between Partner and Enterprise WSDL lies, and it will be detailed in a later section.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full wp-caption\"><img fetchpriority=\"high\" decoding=\"async\" width=\"544\" height=\"582\" class=\"wp-image-2321\" src=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/08\/1_K8fCkse8KHoBm_xD8sen8w.png\" alt=\"\" srcset=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/08\/1_K8fCkse8KHoBm_xD8sen8w-200x214.png 200w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/08\/1_K8fCkse8KHoBm_xD8sen8w-280x300.png 280w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/08\/1_K8fCkse8KHoBm_xD8sen8w-400x428.png 400w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/08\/1_K8fCkse8KHoBm_xD8sen8w.png 544w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/>\r\n<figcaption>The project in\u00a0Eclipse<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Now, before making any attempt to call the SOAP API &#8230;<\/p>\r\n<h4>We need to create a <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/sforce_api_calls_login.htm\" target=\"_blank\" rel=\"noopener\"><strong>connection<\/strong> to the org<\/a>, which needs a proper authentication. This is done using the following bit of code :<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>ConnectorConfig config = <strong>new<\/strong> ConnectorConfig();<br \/>config.setUsername(username);<br \/>config.setPassword(password);<br \/>config.setAuthEndpoint(authEndPoint);<\/code><\/pre>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>PartnerConnection connection = Connector.<em>newConnection<\/em>(config);<\/code><\/pre>\r\n\r\n\r\n\r\n<p>where <code>username<\/code>, <code>password<\/code> and <code>authEndPoint<\/code> are String variables defined in the code. The username and password are the <strong>user credentials <\/strong>(for the password, we need to append the <a href=\"https:\/\/help.salesforce.com\/articleView?id=user_security_token.htm&amp;type=5\" target=\"_blank\" rel=\"noopener\">security token<\/a> after the user password as well). The authEndPoint string is a url on the form: <code><a href=\"https:\/\/%5Borg\" target=\"_blank\" rel=\"noopener\">https:\/\/[org<\/a> name].my.salesforce.com\/services\/Soap\/u\/[version number]\/<\/code>. We thereafter use this <code>connection<\/code> object to initiate any call we make to Salesforce.<\/p>\r\n\r\n\r\n\r\n<p>Here we are, we\u2019ve generated the proxy code necessary to our project, now let\u2019s see in a bit more details what these WSDL are.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>The Partner\u00a0WSDL<\/strong><\/h2>\r\n\r\n\r\n\r\n<h4>Let\u2019s start with the <strong>Partner<\/strong> WSDL :<\/h4>\r\n<p>If we recall the documentation, this file is <strong>loosely typed<\/strong> and <strong>static<\/strong>. The static part means the file <strong>does not change when there is a change in the org customization<\/strong>, hence it can be used to interact with any configuration of org. This means that an application using the Partner WSDL will not need to generate its proxy code every time there is a change in the org, it thus requires less maintenance. About the \u201cloosely typed\u201d part of the description, we\u2019ll see in details what it means in this section.<\/p>\r\n\r\n\r\n\r\n<h4>Let\u2019s look a bit closely to the structure of the file itself\u00a0:<\/h4>\r\n<p>As an XML file, it is composed of a hierarchy of tags nested one into the other. Each of these tags will be interpreted by the compiler and translated into something in the proxy code, either a class or a method, for instance.<\/p>\r\n<h4>Here is what we get when we look more closely at the first part in our Partner WSDL :<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>&lt;schema elementFormDefault=\u201dqualified\u201d xmlns=\u201dhttp:\/\/www.w3.org\/2001\/XMLSchema\" targetNamespace=\u201durn:sobject.partner.soap.sforce.com\u201d&gt;\r\n\r\n    &lt;import namespace=\u201durn:partner.soap.sforce.com\u201d\/&gt;\r\n\b\r\n    &lt;! \u2014 Dynamic sObject -&gt;\r\n    &lt;complexType name=\u201dsObject\u201d&gt;\r\n        &lt;sequence&gt;\r\n            &lt;element name=\u201dtype\u201d type=\u201dxsd:string\u201d\/&gt;\r\n            &lt;element name=\u201dfieldsToNull\u201d type=\u201dxsd:string\u201d nillable=\u201dtrue\u201d minOccurs=\u201d0\" maxOccurs=\u201dunbounded\u201d\/&gt;\r\n            &lt;element name=\u201dId\u201d type=\u201dtns:ID\u201d nillable=\u201dtrue\u201d \/&gt;\r\n            &lt;any namespace=\u201d##targetNamespace\u201d minOccurs=\u201d0\" maxOccurs=\u201dunbounded\u201d processContents=\u201dlax\u201d\/&gt;\r\n        &lt;\/sequence&gt;\r\n    &lt;\/complexType&gt;\r\n&lt;\/schema&gt;<\/code><\/pre>\r\n\r\n\r\n\r\n<p>The first section is a <code>schema<\/code> tag, that will be interpreted as a Java package when the WSDL is consumed. This contains an <code>import<\/code> tag, followed by a <code>complexType<\/code> that represents a class.<\/p>\r\n<p>This tag includes a sequence section that contains a list of <code>element<\/code> tags, each representing a method or an attribute of this object.<\/p>\r\n<p>So from what we observe in the file we expect that the proxy code created using this file is going to include a class named <code>SObject<\/code> that contains several attributes such as <code>Type<\/code> or <code>Id<\/code> and the associated setter and getter methods.<\/p>\r\n<p>Indeed this is what we find in the <code>com.sforce.soap.partner.sobject<\/code> package. We also see that the class extends another class, <code>XmlObject<\/code>, that is defined in the WSC file that we used above to compile the libraries. This <code>SObject<\/code> class can represent <strong>any Salesforce object<\/strong> (such as Account or Case, for instance). That is the class we are going to use when calling the API.<\/p>\r\n<p>This is what is meant by \u201cloosely typed\u201d in the WSDL definition : <strong>there is not a specific class for each SObject but rather a generic class that will have to be attributed a type.<\/strong><\/p>\r\n\r\n\r\n\r\n<h4>Here is a sample code to create an Account as an example(similar to the <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/sample_create_call.htm\" target=\"_blank\" rel=\"noopener\">documentation example<\/a>) :<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>SObject account = <strong>new<\/strong> SObject();\r\naccount.setType(\"Account\");\r\naccount.setField(\"Name\", \"Test\");\r\n\r\nSObject[] accounts = new SObject[1];\r\naccounts[0] = account;\r\n\r\nSaveResult[] results = connection.create(accounts);<\/code><\/pre>\r\n\r\n\r\n\r\n<p>As we can see, the first step after creating the SObject is to set its type, then we can set any field using the syntax : <code>variable.setField(\u201cfieldName\u201d, \u201cvalue\u201d);<\/code>.<\/p>\r\n<p>We then put this variable into a list and use the <code>create()<\/code> method of the connection object we created earlier to insert this list.<\/p>\r\n<p>There is also the possibility to use <code>update()<\/code> or <code>upsert()<\/code> methods, and there is a <strong>wide variety of <\/strong><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/sforce_api_calls_list.htm\" target=\"_blank\" rel=\"noopener\"><strong>methods<\/strong><\/a> that are available such as <code>convertLead()<\/code> or <code>findDuplicates()<\/code>.<\/p>\r\n\r\n\r\n\r\n<p>The response of the request is stored in the <code>result<\/code> variable that we can use to check the success of the record creation and more details like the record Id (in case of a success) or an error message (in case of failure).<\/p>\r\n\r\n\r\n\r\n<p>Hence, because of its loosely typed property, <strong>the Partner WSDL is used for application that retrieve information about an object<\/strong> (with <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/sforce_api_calls_list_describe.htm\" target=\"_blank\" rel=\"noopener\">methods<\/a> like <code>describeSObject()<\/code>, for instance) before interacting with this object. In that case, the type of the object being handled is one of several parameters.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">The Enterprise WSDL<\/h2>\r\n\r\n\r\n\r\n<p>Now we have seen what are the distinctive features of the Partner WSDL. We can guess what the Enterprise WSDL definition means : <strong>strongly typed and tied to a specific Salesforce configuration<\/strong>.<\/p>\r\n<p>Strongly typed, as opposed to loosely typed, means that the <code>SObject<\/code> class will be replaced by more specific classes (even though the <code>SObject<\/code> class still exists). It results from this that it will be bound to a single Salesforce configuration (indeed, if a new object is added to and org, it automatically makes any previous Enterprise WSDL obsolete).<\/p>\r\n<p>This also implies that the Enterprise WSDL is generally a much bigger file than the Partner (24000 lines against 7900 in our example), as it must contain the information about the metadata present in the org.<\/p>\r\n\r\n\r\n\r\n<h4>The structure of the file is similar to the Partner WSDL, except it contains not only a definition of the SObject but a large number of other objects such as the Account, as shown below (abridged version) :<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>&lt;complexType name=\"Account\"&gt;\r\n    &lt;complexContent&gt;\r\n        &lt;extension base=\"ens:sObject\"&gt;\r\n            &lt;sequence&gt;\r\n                &lt;element name=\"AccountCleanInfos\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"\/&gt;\r\n                &lt;element name=\"AccountContactRoles\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"\/&gt;\r\n                &lt;element name=\"AccountNumber\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"\/&gt;\r\n                &lt;element name=\"AccountPartnersFrom\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"\/&gt;                ...\r\n\r\n                &lt;element name=\"Type\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"\/&gt;\r\n                &lt;element name=\"UserRecordAccess\" nillable=\"true\" minOccurs=\"0\" type=\"ens:UserRecordAccess\"\/&gt;\r\n                &lt;element name=\"Users\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"\/&gt;\r\n                &lt;element name=\"Website\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"\/&gt;\r\n                &lt;element name=\"YearStarted\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"\/&gt;\r\n            &lt;\/sequence&gt;\r\n        &lt;\/extension&gt;\r\n    &lt;\/complexContent&gt;\r\n&lt;\/complexType&gt;<\/code><\/pre>\r\n\r\n\r\n\r\n<p>In this case, we have classes that represent each object in your org including the custom objects. This means that the type of each object we would use is more strongly defined in the proxy code, which is what is meant by \u201cstrongly typed\u201d.<\/p>\r\n\r\n\r\n\r\n<p>The enterprise WSDL thus allows you to manipulate directly your objects, with the associated fields. On the other hands you need to re-generate the WSDL and consume it again every time you make a change in an object which is not the case with the partner WSDL.<\/p>\r\n<h4>Here is a sample code to create an Account as in the previous example, this time using the Enterprise WSDL :<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>Account a = <strong>new<\/strong> Account();\r\na.setName(\"AccountTest\");\r\n\r\nAccount[] accounts = new Account[1];\r\naccounts[0] = a;\r\n\r\nSaveResult[] results = connection.create(accounts);<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Unlike with the Partner WSDL, this time <strong>we don\u2019t have to set the object type<\/strong> as it is a different class we manipulate. There are <strong>specific methods associated to each field <\/strong>(that contain the API name of the field) to either get or set it.<\/p>\r\n<p>The same methods as with the Partner WSDL (<code>update()<\/code>, <code>convertLead()<\/code>, etc\u2026) are available as well.<\/p>\r\n\r\n\r\n\r\n<p>It is to be noted that, as another difference with the Partner WSDL, the connection uses an <code>EnterpriseConnection<\/code> instead of the <code>PartnerConnection<\/code> to connect with the org.<\/p>\r\n<p>Also the endpoint url is of the <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/implementation_considerations.htm\" target=\"_blank\" rel=\"noopener\">form<\/a> <code><a href=\"https:\/\/%5Borg\" target=\"_blank\" rel=\"noopener\">https:\/\/[org<\/a> name].my.salesforce.com\/services\/Soap\/c\/[version number]\/<\/code> (note the <code>c<\/code> instead of the <code>u<\/code>).<\/p>\r\n\r\n\r\n\r\n<p>The fact that a lot of elements of configuration are present in the Enterprise WSDL means that one would need to <strong>generate and compile it again to take into account any new piece of customization<\/strong> in the client app. But this also makes the client code more readable as well. So it can be suited for some applications where there is a unique link between an org and a client app.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>Summary<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>In summary, the Partner WSDL is more likely to be used in applications that would <strong>dynamically inspect object properties before using it.<\/strong><\/p>\r\n<p>For instance when an <strong>application works across several orgs<\/strong>. Because it is loosely typed, it requires to set the type of each object in use, but it does not need to be re-generated every time there is a modification in the org (only once for each release). This makes it a strong candidate to be used in flexible applications that could make calls to several Salesforce organizations.<\/p>\r\n\r\n\r\n\r\n<p>On the other hand, the Enterprise WSDL is strongly typed which means it is bound to a specific org. Any modification in the customization needs a <strong>new consumption<\/strong> to be taken into account. This doesn\u2019t require to inspect the metadata before using it but prevents from working across multiple orgs. The fact that each object has a designated class also makes the code more readable.<\/p>\r\n\r\n\r\n\r\n<p>In conclusion, there is a <strong>tradeoff between maintainability, readability and flexibility<\/strong> that should be considered when choosing between Partner and Enterprise WSDL. That also depends on the specific context of each usage of the SOAP API.<\/p>\r\n<p>In any case, the possibilities offered by the SOAP API are the same regardless of the type of WSDL that is used. Furthermore, we saw that it allows a great variety of operations to be performed on the Salesforce data.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>References<\/strong><\/h2>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><a href=\"https:\/\/trailhead.salesforce.com\/en\/content\/learn\/modules\/api_basics\/api_basics_soap\" target=\"_blank\" rel=\"noopener\">The SOAP API Trailhead unit<\/a><\/li>\r\n<li><a href=\"https:\/\/www.w3schools.com\/xml\/xml_wsdl.asp\" target=\"_blank\" rel=\"noopener\">The WSDL in w3schools<\/a><\/li>\r\n<li><a href=\"https:\/\/www.w3.org\/TR\/2001\/NOTE-wsdl-20010315#_9.__\" target=\"_blank\" rel=\"noopener\">More description of the protocol<\/a><\/li>\r\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api.meta\/api\/sforce_api_quickstart_steps_walk_through_code.htm\" target=\"_blank\" rel=\"noopener\">Detailed sample code in Java and C#<\/a><\/li>\r\n<\/ul>\r\n","protected":false},"excerpt":{"rendered":"<p>Introduction The SOAP protocol is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs. Using it in a client application can prove difficult if one has no deep knowledge about how the protocol works and how to build the requests. That\u2019s why Salesforce provides us with [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":5311,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[150],"tags":[307],"class_list":["post-187","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-conseils","tag-development-en"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Salesforce and WSDL\u00a0: a SOAP opera - Texe\u00ef<\/title>\n<meta name=\"description\" content=\"The SOAP protocol is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Salesforce and WSDL\u00a0: a SOAP opera\" \/>\n<meta property=\"og:description\" content=\"The SOAP protocol is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/\" \/>\n<meta property=\"og:site_name\" content=\"Texe\u00ef\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-11T10:18:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-17T14:45:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2020\/09\/User_Scenario.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Loic Nicolas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/\"},\"author\":{\"name\":\"Loic Nicolas\",\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/person\\\/32d30458389e87b451b28c5a2822fff6\"},\"headline\":\"Salesforce and WSDL\u00a0: a SOAP opera\",\"datePublished\":\"2020-09-11T10:18:28+00:00\",\"dateModified\":\"2024-04-17T14:45:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/\"},\"wordCount\":2108,\"publisher\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/User_Scenario.png\",\"keywords\":[\"Development\"],\"articleSection\":[\"Conseils\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/\",\"url\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/\",\"name\":\"Salesforce and WSDL\u00a0: a SOAP opera - Texe\u00ef\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/User_Scenario.png\",\"datePublished\":\"2020-09-11T10:18:28+00:00\",\"dateModified\":\"2024-04-17T14:45:46+00:00\",\"description\":\"The SOAP protocol is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/#primaryimage\",\"url\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/User_Scenario.png\",\"contentUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/User_Scenario.png\",\"width\":1440,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/conseils\\\/salesforce-and-wsdl-a-soap-opera\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/texei.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advices\",\"item\":\"https:\\\/\\\/texei.com\\\/en\\\/category\\\/advices\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Salesforce and WSDL\u00a0: a SOAP opera\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/texei.com\\\/#website\",\"url\":\"https:\\\/\\\/texei.com\\\/\",\"name\":\"Texe\u00ef\",\"description\":\"Turn your IT into Business\",\"publisher\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/texei.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/texei.com\\\/#organization\",\"name\":\"Texe\u00ef\",\"url\":\"https:\\\/\\\/texei.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/logo-essai-1.jpg\",\"contentUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/logo-essai-1.jpg\",\"width\":2560,\"height\":1102,\"caption\":\"Texe\u00ef\"},\"image\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/person\\\/32d30458389e87b451b28c5a2822fff6\",\"name\":\"Loic Nicolas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/avatar_user_14_1690808344-96x96.png\",\"url\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/avatar_user_14_1690808344-96x96.png\",\"contentUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/avatar_user_14_1690808344-96x96.png\",\"caption\":\"Loic Nicolas\"},\"url\":\"https:\\\/\\\/texei.com\\\/en\\\/author\\\/loicnicolas\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Salesforce and WSDL\u00a0: a SOAP opera - Texe\u00ef","description":"The SOAP protocol is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/","og_locale":"en_US","og_type":"article","og_title":"Salesforce and WSDL\u00a0: a SOAP opera","og_description":"The SOAP protocol is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs.","og_url":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/","og_site_name":"Texe\u00ef","article_published_time":"2020-09-11T10:18:28+00:00","article_modified_time":"2024-04-17T14:45:46+00:00","og_image":[{"width":1440,"height":1080,"url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2020\/09\/User_Scenario.png","type":"image\/png"}],"author":"Loic Nicolas","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/#article","isPartOf":{"@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/"},"author":{"name":"Loic Nicolas","@id":"https:\/\/texei.com\/#\/schema\/person\/32d30458389e87b451b28c5a2822fff6"},"headline":"Salesforce and WSDL\u00a0: a SOAP opera","datePublished":"2020-09-11T10:18:28+00:00","dateModified":"2024-04-17T14:45:46+00:00","mainEntityOfPage":{"@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/"},"wordCount":2108,"publisher":{"@id":"https:\/\/texei.com\/#organization"},"image":{"@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/#primaryimage"},"thumbnailUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2020\/09\/User_Scenario.png","keywords":["Development"],"articleSection":["Conseils"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/","url":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/","name":"Salesforce and WSDL\u00a0: a SOAP opera - Texe\u00ef","isPartOf":{"@id":"https:\/\/texei.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/#primaryimage"},"image":{"@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/#primaryimage"},"thumbnailUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2020\/09\/User_Scenario.png","datePublished":"2020-09-11T10:18:28+00:00","dateModified":"2024-04-17T14:45:46+00:00","description":"The SOAP protocol is one of the many possibilities offered by Salesforce to interact with its database using standard or custom APIs.","breadcrumb":{"@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/#primaryimage","url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2020\/09\/User_Scenario.png","contentUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2020\/09\/User_Scenario.png","width":1440,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/texei.com\/en\/conseils\/salesforce-and-wsdl-a-soap-opera\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/texei.com\/"},{"@type":"ListItem","position":2,"name":"Advices","item":"https:\/\/texei.com\/en\/category\/advices\/"},{"@type":"ListItem","position":3,"name":"Salesforce and WSDL\u00a0: a SOAP opera"}]},{"@type":"WebSite","@id":"https:\/\/texei.com\/#website","url":"https:\/\/texei.com\/","name":"Texe\u00ef","description":"Turn your IT into Business","publisher":{"@id":"https:\/\/texei.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/texei.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/texei.com\/#organization","name":"Texe\u00ef","url":"https:\/\/texei.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texei.com\/#\/schema\/logo\/image\/","url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/03\/logo-essai-1.jpg","contentUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/03\/logo-essai-1.jpg","width":2560,"height":1102,"caption":"Texe\u00ef"},"image":{"@id":"https:\/\/texei.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/texei.com\/#\/schema\/person\/32d30458389e87b451b28c5a2822fff6","name":"Loic Nicolas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2023\/07\/avatar_user_14_1690808344-96x96.png","url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2023\/07\/avatar_user_14_1690808344-96x96.png","contentUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2023\/07\/avatar_user_14_1690808344-96x96.png","caption":"Loic Nicolas"},"url":"https:\/\/texei.com\/en\/author\/loicnicolas\/"}]}},"_links":{"self":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":0,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/media\/5311"}],"wp:attachment":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}