13.3. Consuming the Web Service
Now we want to flip over and see the other side, the receiver of the message. Messages are always targeted at a URL. When using a messaging provider, the URL is the location of the messaging middleware. In a direct (providerless) model, the URL is the location of the intended recipient. The fact that we are communicating with software listening at a particular URL suggests that a servlet implementation would be appropriate for our listener, and indeed JAXM includes a JAXMServlet that is a good starting point for creating our own endpoint. We create a JaxmStandingsServlet that extends the JaxmServlet and holds an instance of DynamicStandings that we'll update each time we receive a message.
There are two listener ...
Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.