Java Web Services: Up and Running

This review was originally printed in the September 2013 edition of the UKUUG newsletter, which is now defunct.

Title: Java Web Services: Up and Running (2nd edition)
Authors: Martin Kalin
ISBN: 9781449373870

Although Java is no longer an exciting new language, its use in academia and enterprise, combined with the availability of platforms such as Amazon Web Services, make this a book which is likely to be of wide interest. There are some major changes to take account of the popularity of RESTful web services – certainly enough to warrant a new edition.

The first chapter gives a fairly lengthy overview of web services, including an explanation of the different architectures and a detailed introduction to the RESTful model which is used throughout the book. This is followed by a chapter on using REST on the server side, with examples using the ‘grizzled workhorse’ HttpServlet and the more recent JAX-RS.

Chapter three switches to the client side, with examples for various services, including Amazon E-Commerce. Although the focus of this book is on Java, a Perl client is also shown to demonstrate that services really are language-agnostic, and there is no need to use the same language for client and server.

Chapters four and five switch from REST to SOAP, which was the focus of the first edition. Whilst many developers – myself included – would dearly like to see this style of web service disappear, it is still widely used and therefore coverage is a necessary evil.

The next chapter is dedicated to security, split into the three categories of wire-level (i.e. the protocol, such as HTTPS), user authentication and authorisation, and WS-Security (specific to web services). Security is sometimes glossed over in programming books, but in this case the author has made it a core part of the text, going down into details such as which cipher suites are available and how a connection is actually made secure.

Rounding off the book is a chapter covering Java Application Servers – an alternative to deploying using a standalone server such as Tomcat. I wasn’t entirely convinced by the arguments in favour of this method, but this chapter provides a good starting point to evaluate the different options.

Overall, this is a good all round introduction to building web service clients and servers in Java. The code samples pad out the text a little bit too much for my liking, but that is probably unavoidable given the verbosity of Java, and the author does warn readers that this is a ‘code-driven tour of web services’.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.