Thursday, 7 February 2019

Setup SoapUI to Test Salesforce Webservice | Configure SoapUI to run SOAP API Calls



In our last Integration post we talk about how to Test REST API using Postman. In this post we will talk about How to Configure SoapUI to run SOAP API Calls


Step 1) Download SoapUI from here.

Step 2) Download the WSDL.

Now download the Enterprise WSDL from your Sandbox/Production or developer Org. Click on Setup-> Search API in Quick Find -> Then select "Generate Enterprise WSDL".

Step 3) Create new SoapUI Project.

Create new SoapUI project . Click on File Menu -> New SOAP Project. Then Add Project Name and Browse WSDL file.


Step 4) Get Session Id. Make a Login Call to Salesforce using SoapUI.

Search the Login Request in new project. Then open the Login XML Request and remove the extra header and add UserName and password. Then click on Green button to submit request.


Step 5) Create a record in Salesforce From SoapUI

Copy the Session Id which we created in Step 4. Then open the create request. Remove the extra tag from request (Header).

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>00D90000000zjSn!AQ4AQJ.6VdLZrC8vVqiaMwS5i151uXYr2_N6jvkQC8ImuED7nbAF.gbJa71s_ijVSPdcYF0sM3HOf5OmwqATTQKgsZWV2uqP</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:create>
<!--Zero or more repetitions:-->
<urn:sObjects xsi:type="Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>TestAccount</Name>
</urn:sObjects>
</urn:create>
</soapenv:Body>
</soapenv:Envelope>
Enter your org Base URL in Request URL and Then click on green button.




Please check our YouTube Channel for SoapUI Configuration to run SOAP API Call

Check Our YouTube Recording Here for Same :-

https://www.youtube.com/watch?v=zPBqHjZFHf4&t=1s





Thanks,
Amit Chaudhary
amit.salesforce21@gmail.com

Capture.JPG  @amit_sfdc    @ApexHours
  Salesforce Apex Hours 
     #SalesforceApexHours

No comments:

Post a Comment