Like

Welcome On Mobius

Mobius was created by professionnal coders and passionate people.

We made all the best only for you, to enjoy great features and design quality. Mobius was build in order to reach a pixel perfect layout.

Mobius includes exclusive features such as the Themeone Slider, Themeone Shorcode Generator and Mobius Grid Generator.

Our Skills

WordPress90%
Design/Graphics75%
HTML/CSS/jQuery100%
Support/Updates80%

Salesforce Integration Using SOAPUI To Test Calls

By Jahanzaib Khan 2 years ago

In this blog, we will cover basic web calls testing with requests and responses using Salesforce. SoapUI provides capabilities to test and verify request and response messages before writing any code in c#, java or any other language. It is always recommended to test your calls with SoapUI before doing any sort of integration using any technology.

SoapUI is a tool to test various web calls or services. It can be used to test different kinds of WSDL and requests/ responses for the APIs.

Salesforce provides enterprise WSDL. If you have admin rights you can download it or please request Salesforce admin to download it for you.

Once you have that WSDL, open SoapUI and create a new SOAP project. Provide a project name and location of the downloaded WSDL

There are basically two steps to integrate with Salesforce – first, call the login() API by provided a valid username and password+token to retrieve SessionId and ServerUrl. SessionId and ServerUrl are important to invoke endpoint with structured request messages (it could be query(), create(), update() or upsert() etc.

Example login() API call

Goal: retrieve the SessionId and SessionUrl

In the project, you created go to login request 1 and provide valid username and password. The sometimes password needs to be concatenated like password+token. After providing the valid information submit the request

You should be then able to see the response. Copy ServerUrl and SessionId values. You need these values to make any further call. This is basically a way of authentication from Salesforce.

Example query() API call – Querying Salesforce records using SOQL

Go to query request 1 and open it. Edit its end point and enter the value you copied from ServerUrl in login() call. In the session, id tag provides SessionId value you copied from login() call. For your reference, I have copied request message below. Using a very simple SOQL query, I select top 10 Accounts with Id and name. Provide that query in the query string and then submit the call. You should be able to see the response in response windows.

 

Request message:

Conclusion:

In the same way, you can test any Salesforce API using the above-mentioned method. For more Salesforce soap API sample please visit Salesforce developer blog. You just need to modify those sample as per your requirement to test and validate them.

 

Author: Jahanzaib khan

Senior Integration Consultant

Email: Jahanzaib.khan@alliedc.com

 

Category:
  Integration
this post was shared 0 times
 000
About

 Jahanzaib Khan

  (4 articles)

Jahanzaib Khan is a Senior Software Engineer in Allied Consultants. With a experience over 4 years in ...................... , . He is one of the key resources of .Net framework for the organization.