Defining a web service returning no value
This recipe explains how to define a web service that will return no value. We distinguish between two types of web service operations that return no value. The first one is synchronous and is where a client waits for a web service operation to finish; however, no content result is expected. This is also called one-way. The second one is a web service operation that is performed in an asynchronous way, where a client does not wait for the response. The content result is either not expected or is handled in a different part of the client code. This type of communication is called asynchronous pooling or callback. The JAX-WS also supports request-response communication as message exchange protocol (MEP). However, this type of communication is used for the methods that return a value.
Getting ready
In this recipe, we will amend the example from the Creating literal and encoded web services recipe.
How to do it…
We will prepare one method (reserveBook...