Java Webservice testing
java, testing, web-services
Solution
As you are dealing with a web service you would not need to use Jakarta Cactus and could get away with writing plain old JUnit tests.
The tests would take two forms:
1. Does the underlying functionality work as expected?
This has nothing to do with the web service itself but the underlying functionality it provides. e.g. Does your Data access objects retrieve/process data correctly? Hopefully your web service interface and the underlying functionality are not tightly coupled.
2. Does the live web service (be it SOAP/REST/XMLRPC) function correctly?
In this case a good way to test this is to build a web service client and write tests to see whether this client works correctly against the web service. e.g. Use Axis/CXF/XFire to build the web service client and then write JUnit tests for the data it returns.
Also remember to target your testing towards what the end users of this web service will be using. If you have written a Java web service but it is being consumed by .Net clients then make sure you test the service against a .Net client. SOAP services are especially troublesome when it comes to consistent cross-platform behavior.
Problem
I provide a web service to my organisation. i was wondering would anyone recommeding the use of apache cactus for setting up a testing framework or has anyone worked with any other web service frameworks that may be useful? Thanks Damien