You are currently viewing How to Insert Account from SoapUI in Salesforce?

How to Insert Account from SoapUI in Salesforce?

Sharing is caring!

SOAP stands for the Simple Object Access Protocol. SOAP follows a strict standard to allow communication between the client and the server. The protocol was designed with the purpose that programs written with various programming languages and on various platforms can easily exchange data. It only uses XML for exchanging data/information. It is more secure as compared to the REST API. SOAP has SSL(Secure Socket Layer) and supports WS-security, at the transport level and is more comprehensive than SSL. In the bank, we prefer to use SOAP API rather than REST API. It requires more bandwidth as it has to convert data/ information into XML, and it is not easy to implement as compared to the REST API.

In this post, we will discuss what SoapUI is and how to insert an account record from the SoapUI tool.

What is SoapUI?

SoapUI is a Functional Testing tool for SOAP and REST testing. It has an easy-to-use graphical interface and enterprise-class features. SoapUI allows you to easily and rapidly create and execute automated functional, regression, and load tests.

It supports REST, SOAP, GraphQL, and JMS(Java message service) protocols.

SoapUI is used for WebAPI or WebService Testing. It can test protocols like REST and SOAP.

SoapUI is not independent; it is protocol-dependent. It can perform functional, security, and load testing. It has the capability of testing the data sent and received between the web server and web browser.

You can insert, update and delete records using SOAP API. Here we are inserting an account record from the SoapUI tool.

How to Insert an Account Record from the SoapUI Tool?

Step 1: First, we need to generate a WSDL file for our org.

  • Go to setup.
  • Search API in the quick box search.
  • Select API under integration.
  • Click on the Generate Enterprise WSDL under Enterprise WSDL as shown below.
  • It will redirect you to the classic mode, and then you have to click on the generate button as shown below.
  • After clicking on the generate button, it will redirect you to a page that has XML code, and then you just have to save this file by using Ctrl + S as shown below.

Step 2: Now, you have to install the SoapUI. 

Here is the installation link: https://www.soapui.org/downloads/soapui/

  • After installation, open SoapUI and click on the File option and select New Soap Project and enter the required data in the initial WSDL browse, the path where you have downloaded the XML file in the previous step. After that, click ok.
  • After clicking on the ok button, the window will look like the below:
  • Now select login from the navigation tab, and then you have to click on Request 1.
  • Now edit the raw code in the window.  
    • Remove the code below from the <soapenv:Header></soapenv:Header>

<urn:LoginScopeHeader>

         <urn:organizationId>?</urn:organizationId>

         <!–Optional:–>

         <urn:portalId>?</urn:portalId>

 </urn:LoginScopeHeader>

  • Update the username and password with your Salesforce org username and password with the security token under <urn:login></urn:login> tag. To get your security token, go to your personal settings and then go to the Reset My Security Token page under My Personal Information. Click Reset Security Token to send an email to the email address associated with your Salesforce org. And then, click the play button (green triangle) in the upper left of the request window.
  • You have to enter your password like ‘salesforcePasswordsecurityToken’

<urn:username>salesforceUsername</urn:username>

            <urn:password>‘salesforcePasswordsecurityToken</urn:password>

  • Copy the SessionId. And now select Create from the navigation tab and double click on Request 1, now you have to make some changes.
  • Remove all the code covers under <urn:EmailHeader> to </urn:AssignmentRuleHeader> tag.
  • Paste the session Id that you have copied in the previous step and paste it in between <urn:sessionId></urn:sessionId> tag.
  • And remove all the code under <urn:sObject> tag and update it with the data you want to add for inserting the account.

<Name> Hello Test Account </Name>

            <Phone>12445</Phone>

  • Now the window will look like this:

Now go to your Salesforce org and move to the Account tab and you will see the account that you have created.

This is how you can insert any Object record in Salesforce from the SOAP API using SoapUI.

Conclusion 

The SOAP API was designed for programs written with various programming languages and on various platforms to easily exchange data. It only uses XML to exchange data. SOAP supports WS-security, at the transport level and is more comprehensive than SSL. The WSDL file is like a map for understanding how to use the API. It contains the bindings, protocols, and objects to make API calls. SoapUI is a Functional Testing tool for SOAP and REST testing. It has an easy-to-use graphical interface and enterprise-class features. It allows you to easily and rapidly create and execute automated functional, regression, and load tests.

SoapUI helps you to easily and rapidly create and execute automated functional, regression, and load tests. Cloud Analogy is known as one of the top-notch Salesforce Consulting companies, and the experts will guide you on how to connect with Salesforce Org using SOAP UI. We assure you with world-class cost-efficient Salesforce Consulting services to transform and grow your business in various ways and act as your trusted Salesforce consulting partner. Reach out to our expert and certified team at Cloud Analogy and start your project today.

sachin

Sachin Arora

Scrum Master and Principal Solutions Architect
Sachin, a renowned Scrum Master and Principal Solutions Architect at Cloud Analogy, has rich experience when it comes to working on process improvement in a fast-paced environment maintaining high level of quality in all deliverables. Sachin's expertise lies in varied hardware and software environments including Cloud technologies such as Salesforce, AWS, Cloud Foundry & Google App Engine and Mobile.

Hire the best Salesforce Development Company. Choose certified Salesforce Developers from Cloud Analogy now.

Leave a Reply

× How can I help you?