Use SoapUI to test the WebService interface.
1. Download tomcat and axis2 and configure the runtime location of the Server and WebService.
2. Create a Java project named WebServiceTest and create a class NumberAndZero.
3. Enter the source code in the class to determine whether the input number is greater than 0, equal to 0, or less than 0.
Package test. webservice; public class NumberAndZero {// determine the size relationship between the parameter and 0 public String numberOverZero (double d) {if (d> 0) return d + "> 0 "; if (d = 0) return d + "= 0"; else return d + "<0 ";}}
4. Select the WebServiceTest project and create a WebService,
5. click Next.
6. Start Server
7. Click the "finish" button after the startup to see that the startup is successful.
8. In this case, Eclipse automatically enters Web Services Explorer and copies the wsdl path.
9. Open SoapUI and create a Soap project.
10. After this is done, change the D value to replace the question mark and send
11. As you can see, the response is received: 88.0> 0
12. Create TestSuite and TestCase and add this request to TestStep of TestCase.
13. Add assertions