How to Use SoapUI for Consuming and Testing SOAP Web Services in 6 easy steps

soap ui screenshot

SoapUI is a powerful, user-friendly tool for testing APIs and web services. It is specifically designed to work with SOAP (Simple Object Access Protocol) web services, which are based on XML messaging and use standardized communication protocols for exchanging structured data over the internet. In this tutorial, we’ll walk you through using SoapUI to consume SOAP web services for testing and development purposes.

Prerequisites

Before you can use SoapUI, you’ll need to download and install the application. Visit the SoapUI website and follow the installation instructions for your system.

Step 1: Create a New SoapUI Project

  1. Launch SoapUI on your computer.
  2. Click on the File menu and choose New Soap Project.
New SOAP Project
  1. In the New Soap Project dialog, enter a project name and the WSDL URL of the SOAP web service you wish to work with. WSDL (Web Services Description Language) is an XML document that describes the interface of the SOAP web service.
New SOAP Project WSDL
  1. Click OK to create your new project.

Step 2: Explore the SOAP Web Service

SoapUI will now display the available SOAP web service operations in the left pane. Expand the nodes to see the operations offered by the web service. Each operation usually corresponds to a specific functionality or task.

Step 3: Create a New Request

  1. Right-click on the desired operation (e.g., ExecuteMethod), and choose New Request.
  2. A new Request 1 will be created under the chosen operation. Provide a meaningful name for it.
  3. Double-click on the new request to open its editor.

Step 4: Enter Inputs for the Request

  1. In the request editor, you’ll see an XML message template generated by SoapUI. This template is based on the WSDL definition of the operation.
  2. Add the required inputs by replacing the ? placeholders in the XML message template with actual values.
  3. You can also modify the headers of the SOAP request if needed. To do this, switch to the Headers tab and edit the key-value pairs.
web service methods

Step 5: Send the Request and Inspect the Response

  1. Click the green Submit button (with the play icon) at the top-left corner of the request editor.
  2. SoapUI will send the request to the SOAP web service and display the server’s response in the right pane of the request editor.
  3. Analyze the response to ensure that the web service functioned as expected. The response is structured as an XML message, similar to the request.

Step 6: Save the Project

Remember to save your project so that you can easily access and edit your requests in the future. Click File > Save Project or press CTRL + S.

Conclusion

By following these steps, you have now learned how to use SoapUI to consume SOAP web services. With this powerful tool, you can test, debug, and explore the functionalities of different SOAP web services. Happy testing!


Posted

in

by

Tags: