Creating the REST client
Now that there is a service that provides a list of movie exhibitions available on the Theater module, we need to update the Store module to consume this API and display the retrieved information on the query page. Here's a graphical representation of this functionality:
The JAX-RS RI defines a client API for RESTful Web Services clients and the base class for this is com.sun.jersey.api.client.Client
. This is the main class we're going to use to develop our client in the next section.
Configuring JAX-RS client libraries and optional package
Before starting the creation of the client, we need to add some Jersey libraries to the project classpath since they provide the client API and JSON classes that we're going to use:
Open the Properties for Store window and go to the Java Build Path section.
Click on the Libraries tab and click on Add External JARs….
Browse to the WebLogic 12c installation directory and go to the
modules
folder at$MW_HOME/oracle_common/modules
.Select...