This article guides you through how to create your first SOAPUI project based on requests and test cases. The examples in this article mainly use the Web services provided by Amazon.com.
Soapui is easy to get started with, but to gain a deeper grasp of SOAPUI's functionality, you need to have a better understanding of the following concepts and techniques:
WSDL– Basic concepts (services, ports, bindings, port types), related Xml-schema
SOAP– Basic concepts, associated WSDL (bindings, etc.), different encoding types (soap-encoded/literal), and message types (DOCUMENT/RPC)
XML -related technologies–xpath, XML Schema, namespaces, and more
The relevant specifications can be found in the W3Schools and the relevant tutorials are found in the zvon.org.
Install, run SOAPUI
Follow the steps below to install and run SOAPUI:
From the top page of the site, the latest version can be installed online via Java Webstart
From site sourceforge, download the version of Windows that installs Soapui, which includes the required Java Runtime Environment (JRE1.5). If you are not sure that your system has the appropriate JRE installed, or if you want to have a Start menu and can uninstall it later, you can install it with this version
From the site sourceforge, download the binary release (for example: "Soapui-1.7.5-bin.zip"), manually unzip, run the Soapui.bat or soapui.sh script under the Bin directory (your system needs to install the Java environment)
Regardless of the type of installation above, the SOAPUI will start with an empty working space.
Create and Import projects
After installing and running SOAPUI, you can create the first SOAPUI project.
Right-click the workspace node in the left navigation panel and select "New WSDL Project"
The project name and the corresponding local WSDL file should be filled in before the project is saved.
After filling in the above content, will help you to create an empty project in the work space
If it is not installed online, there is an example project at the root of the downloaded file; Select "Import project" to find Sample-soapui-project.xml.
You can get more information about the project from the User Guide.
Project Add Web service
You can now add an interface to the project (WebService porttypes).
Right-click the project node and select "Add WSDL from URL"
Enter the URL of the WSDL interface:
http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl
Add Amazon's Web service and choose the OK button
Soapui will prompt you to create a default request for each action, usually select the "Yes" button
Soapui created a soap/http binding for Amazon's port type "Awsecommerceserviceporttype" and created a node for each operation.
You can get more information about the interface from the User Guide.
Operation Request
The above actions have added Amazon Web services and can then execute the request. When adding an interface above, a default request has been created for each operation based on the schema definition of the WSDL.
Expand any of the operations nodes below the interface to see the "Request 1" node created
Double-click the request node and the request editor (reference) appears on the right side of SOAPUI
Request editor divided into three parts
? Top toolbar that contains a set of requests related actions, actions
? On the left is the request area
? To the right is the response area
SOAPUI The default generated request, "?" Represents the content that needs to be replaced. These values can be replaced or removed as needed. Send a request by pressing the leftmost button (green arrow) on the toolbar
The request will be executed in the background and the response will appear on the right side of the editor
You can get more information about the request from the User Guide.
SOAPUI Quick Start