Join Alex Theedom for an in-depth discussion in this video Use JSONP, part of RESTful Service with JAX-RS 2.0.
- [Narrator] Okay, let's go straight to…the book service class and refactor the way we deserialize…the list of books we receive from the back end.…As you can see, the way we are handling this at the moment…is to specify that we want a list of books,…and that the response should attempt deserialize…this JSON into a list of books.…So let's change this, so we can do this operation manually.…So the first thing we need to do is to clear…the cached book array to ensure that the list…of books that we're going to be retrieving…is a fresh list of books.…
So what we need to do, is we need to request…that the response is deserialized to a Json array class.…We know this is the right type…because the response will be a list of books.…So we start by writing JsonArray, which we know is going…to be the type, and going to call this jsonArray.…And as before, I'm simply going to use the response.…Now, from the response, I'm going to call…the read entity entity method,…and parse into the read entity method, the JsonArray class.…
Join Alex Theedom as he guides you through a wide range of topics, including how to define resource endpoints, how to add dynamism to your application with hypermedia, how to maintain data integrity with Bean Validation, and how to process messages with the JSON Processing API. Once you have completed this course, you'll be ready to develop your own client and server RESTful APIs.
- Discover the extent of JAX-RS's features
- Use the annotation methodology
- Use the inheritance methodology
- Define a REST contract and API root
- Create the REST resource entity
- Create the REST resource methods
- Understand consumers and producers
- Work with different media types
- Define and work with path parameters
- Build a REST response and handle exceptions
- Implement Bean Validation and manage failures
- Create a RESTful client that consumes the web service
- Use JSON-P API with the REST client
- Implement hypermedia (HATEOAS)
Skill Level Intermediate
1. JAX-RS 2.0
2. Introduction to Bookshop Application
3. Create a REST Resource
4. Responses and HATEOAS
5. Bean Validation API
6. Create a REST Client
Next steps1m 20s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.