views:

1036

answers:

3
+3  Q: 

Dummy web service

I received a WSDL file for a web service interface that our system should call somewhere in the future.

Until then, I'd like to setup a dummy/mockup web service that does nothing else than to log the web service invocations and return dummy data.

What I've done so far is to generate Java objects from the WSDL file.

What's the fastest way to setup such a mockup web service when you already have an application server (here: JBoss) running?

+7  A: 

We just faced this same problem, and found SoapUI to be the perfect tool. Given a WSDL it'll create a service on your machine you can call, and it allows you to edit the response as you need.

Danimal
I've just done some drive-by work with WSDLs, and I've got to agree with you: SoapUI is an amazing tool.
Brian
+2  A: 

You can also use Fiddler, a HTTP Debugging Proxy. You can easily configure Fiddler to return a pre-defined HTTP response with its AutoResponder feature when a request is sent to a particular URL.

Eoin
+1  A: 

You can use Apache Axis's wsdl2java to generate skeleton classes from the WSDL:

Just as a stub is the client side of a Web Service represented in Java, a skeleton is a Java framework for the server side. To make skeleton classes, you just specify the "--server-side --skeletonDeploy true" options to WSDL2Java.

...

The skeleton class is the class that sits between the Axis engine and the actual service implementation.

You would effectively be creating your own version of the server-side implementation of the web service. You can then implement the skeleton to return some stub/dummy data, deploy that to your application server, and then make web service calls to your skeleton just as you would to the live web service.

matt b