Evaluating Web Services Using SOAPUI

The Web Services play a vital role in Salesforce development. After developing these Web Services, it is important to properly test whether the services are working fine or not.

Introduction: 

The Web Services play a vital role in Salesforce development. After developing these Web Services, it is important to properly test whether the services are working fine or not.

SOAPUI 

SOAPUI is one of the open source cross-platform API Testing tool. It allows users to execute automated functional, regression, compliance, and load tests on different Web API.

SOAPUI supports all the standard protocols and technologies to test all kinds of APIs. We can test both Web Service (SOAP) and Web API (REST) and the standard and custom web services using SOAPUI.

Let us see how to use the SOAPUI to test the salesforce WSDL. First, we need to get Enterprise WSDL from Salesforce. It allows you to easily integrate Salesforce.com with your applications

Step-1:

Log into Salesforce and go to Setup -> Enter API in quick find box->click Enterprise WSDL -> click ‘Generate WSDL’ button and save it.

Download the SOAPUI and install it.

Step –2:

Open the SOAPUI. Go to File -> select New SOAP Project

soapui

Step – 3: 

Enter name and select the generated WSDL file and click Ok.

Step- 4:

After clicking ok, the project name (SOAPAPI) folder appears in the navigator panel on the left side of the screen. Here, you can see all the available methods in the web service.

soapui

Step – 5:

Expand the Login Method and click on the soap request under Login Folder. Then, you can see the sample SOAP login request format in the screen as below

soapui

In this example the Endpoint URL is https://login.salesforce.com/services/Soap/c/39.0/0DF28000000fyF3

  • https://—States secures HTTP.
  • login.salesforce.com—Top-level domain for a login request.
  • /services/Soap—states that we’re making a SOAP API request.
  • /c—states that we’re using the enterprise WSDL. Use /u for the partner WSDL.
  • /39.0—API version number
  • / 0DF28000000fyF3—Package version number.

Step-6:

Click the Submit request button at the left corner in the request window.

soapui

For accessing other methods in Salesforce, we need to use the server Url and sessionID in the response section.

External web service WSDL

Likewise, you can also test the external SOAP Web services, which we are going to use in our Salesforce development. Look at the below example

Here, we can see how to use some external web service to get the list of cities for a country name. Get the WSDL from here and follow the steps 2 & 3

soapui

To the list of cities, type country name in request section and click the Request Submit button. Then, the response appears in the right-side response section.

soapui

In the same method, you can test other standard and custom WSDL using SOAPUI.

Summary:

SOAPUI is a tool with simple User Interface which makes both technical and non-technical users to test web services easily. SOAPUI also provides â€˜Logs panel’ and it has the complete information regarding the transaction between the client and the server.

Web References:

http://www.guru99.com/soapui-tutorial.html

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.