Developing and Testing Web Services

soapUI client

If you’re developing or testing web services, you’ll be wanting a nice, free SOAP client: and soapUI fits the bill nicely. It’s a desktop application for inspecting, invoking, and developing web services over HTTP. It’s also a testing tool, so you can do functional, load and compliance testing of your web services.

For web service inspection and invocation, the product shows imported WSDLs as a hierarchical view of interfaces and their operations. It can generate requests from associated schema, and supports Basic, Digest, WS-Security and NTLM authentication.

If you’re developing and validating web services, soapUI can generate both server and client code for many target SOAP APIs, including JBossWS, JAX-RPC, JWSDP, JAXB, Axis, XFire and .NET 2.0. It can also generate WSDLs from existing Java code; and generate XML Binding classes. For Ant and Maven aficionados, there’s good command-line support, so it’s pretty easy to integrate soapUI into your continuous integration/build environment.

Finally, if you’re doing functional or load testing, soapUI will create test suites/test cases containing requests to imported web services; and can create any number of load tests for a test case. Customising generated code can be problematic, but soapUI gets around this by allowing you to add your own Groovy scripts for custom functionality.

Version 1.6 brings with it a number of improvements, including: WSDL caching and exporting; JUnit Reports for running functional tests from the command line; and support for importing secured WSDLs.

soapUI comes in various flavors: the traditional, downloadable application; as plug-ins for various IDEs (not just the obligatory Eclipse, refreshingly: there are also plug-in versions for NetBeans, IntelliJ and JBossWS – which is, admittedly, itself built on Eclipse).

As the client is written in Java, it’s also available from the soapUI website as a Java WebStart (JWS) app: just click to launch, no installation required. As long as you have the correct version of Java installed, of course. The JWS version is great for getting started quickly; or you could even use it solely, instead of an installed copy, and thus be guaranteed to be running an up-to-date version of the software. It’s possible to run the latest snapshot build via JWS, which is useful for checking the latest bleeding-edge copy. If you encounter a bug, you don’t need to uninstall to return to the previous version: just click on a different link.

There’s an on-line user guide, and a Getting Started guide which uses the Amazon Web Service as an example. (Lucky they didn't use Google's SOAP Search API)...

About the Author

Matt Stephens is a senior architect, programmer and project leader based in Central London. He co-wrote Agile Development with ICONIX Process, Extreme Programming Refactored, and Use Case Driven Object Modeling with UML - Theory and Practice.