views:

371

answers:

2

Hi

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

+3  A: 

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.

David Harrison
Hi DavidThanks so much for these responses.These points are very valid and i will definitely look at implementing them.ThanksDamien
Damo
+1  A: 

There is an open source application called SoapUI(http://www.soapui.org/). With this application, you can do 1) manual testing of webservices OR 2) use groovy (a java like scripting) language to do functional testing.

It works pretty well and a lot of organizations are using it. They have an open source version as well as a commercial (with more functionality and support) version. Check it out.

anjanb