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?

Asked by: Cherry899 | Posted: 23-01-2022

Answer 1

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.

Answered by: Kimberly188 | Posted: 24-02-2022

Answer 2

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.

Answered by: Lily804 | Posted: 24-02-2022

Answer 3

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.

Answered by: Melissa559 | Posted: 24-02-2022

Similar questions

How to write a java web service to do remote login?

I have two application. I need to do a single signon from application a to application b. I thinking of using web service. I wonder how do i go about that approach. Can anyone advise?

Get Raw XML from java web service call in .NET

I am calling a Java web service using a .NET client, the return message is badly formatted since the deserialzation process throws an exception. Is there a way to view the raw xml data being returned by the web service in the .NET Client. Many thanks

xml - Simple Java Web Service client over HTTPS

I am connecting to a simple XML over HTTPS web service and getting a security exception. My question is whether you think the cause of this is the cert on the web server, so I should talk to the server admin or if my client code should be handling this. I would love to hear if anyone has encountered and solved this issue. Is the solution found on client side or server side? Below is the exception. Caused by...

java - Unable to call a web service from Groovy

I'm going through the first examples from the new Java Web Services: Up and Running book. I tried to go through the SOAP client example for Java on page 13, but in Groovy. So here is my Groovy shell code: import javax.xml.namespace.QName import javax.xml.ws.Service import java.n...

How to make a Java client for a WCF service secured with X.509?

I have a WCF service that uses X.509 certificates for authentication. What's the best method of creating a Java client that can use that service? I've heard of Axis, CXF, Tango, and WSS4J, but I'm not sure which supports X.509 and which one is a good way of working with WCF.

java - Do I need an AAR file for an Axis web service?

I am getting started with an Axis-based web service, written in Java, which will run on WebSphere. My question is, can I just bundle this up as a web application like I usually do, as a WAR file inside of an EAR file, or do I need an AAR file, inside a WAR file, inside an EAR file? Or are AAR files just for packaging up web service components on their own?

java - Can JAX-WS be used to let a server execute web service calls on a client?

I'm playing around with P2P. I want to use JAX-WS for communication inside a P2P network. Some peers are "behind a firewall", so they can't listen on ports. (They act as clients). Other peers are allowed to listen on ports. (They act as servers (and clients)). Now I want to be able to abstract from the fact, which peers are server and which not. So, pee...

java - Axis 1.2 web service with JDK 1.6.0

We ate migrating one of our axis web service which was built using JDK 1.4 and axis 1.0. We are trying to migrate it to JDK 1.6.0 with axis 1.2, but I am getting the following null pointer exception. The same code is working fine as soon as switch back to JDK 1.4. Any help? Thanks in advance. java.lang.NullPointerException at au.com.michaelpage.placement.model.rdb.dao.StatusDAO.s...

How do I get my simple Java web service to work?

In a textbook exercise, we make 3 Java classes and an XML file. My questions are: Where should I save these .java files? I'm using NetBeans 6.5 so the default is My Documents. What should I name the XML file? I am using XAMPP so the file WSDL.xml I put in xampp/httdocs but when I open[/]ts?wsdl it says page not found.

java - Axis Web Service Keep Alive

I have an axis web service running in Tomcat. Clients are making connections without sending a Connection: close header in HTTP 1.1 which means that the default is Keep-Alive. Unfortunately the client seems to be having a problem and when it gets an exception the client is not closing the connection. Since these clients are sending lots of traffic in batch jobs this quickly eats up all my connections. I want to force my we...

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)