Spring Web Services
Exercise: Google Books Client
Use
Google's Books API to search for books in the catalog service:
- Implement a component
GoogleBooksClient
that invokes the volume's list method (see API Reference) with appropriate query parameters (see API Guide)
- Implement classes corresponding to the list method's response (see API Reference) and convert the returned objects into
Book
objects
- In the catalog service update the following methods:
findBook
searches the book in Google's Book API if it is not found in the local database
searchBooks
returns all matching books of the local database and Google's Book API (without duplicates)
(Books from Google's Book API that do not have an isbn, title, authors, publisher, or price are ignored.)