From the course: Learning Java Enterprise Edition

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

JAX-RS in practice, part 1

JAX-RS in practice, part 1 - Java EE Tutorial

From the course: Learning Java Enterprise Edition

Start my 1-month free trial

JAX-RS in practice, part 1

- [Narrator] Okay, let's go back to the Cargo Tracker website where we will see an example of how a client interacts with the REST endpoint. We will then take a look at how the backend JAX-RS endpoints respond to client requests. We will also take a chance to see how the JAX-RS can also be a client or a REST endpoint. Okay, let's go back to the tracker application and have a look at the live map. The live map shows the current location of all the cargoes we have in the system. This page is constructed from an HTTP page which is loaded into and iframe. And in that iframe, there is an AJAX call that is made to the REST endpoint that returns a list of cargo objects in a JSON format. Let's have a look at that. So, I'm going to view frame source and if we scroll down, we can see a call to an endpoint. So, here is the AJAX call to the REST endpoint, cargo-tracker/rest/cargo. So, what we can do, is we can actually test this URL and see what data this returns. I'm going to copy this URI and…

Contents