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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access