REST Java Web Services
4.4 (255 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
2,027 students enrolled
Wishlisted Wishlist

Please confirm that you want to add REST Java Web Services to your Wishlist.

Add to Wishlist

REST Java Web Services

A guide to understanding, accessing, and writing a REST Java web service using Apache and Java EE.
4.4 (255 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
2,027 students enrolled
Created by Taylor Corey
Last updated 5/2017
English
Current price: $10 Original price: $25 Discount: 60% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 4.5 hours on-demand video
  • 10 Articles
  • 10 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand Web Service Concepts
  • Write a REST Client in Java
  • Write a RESTful Web Service in Java
  • Use SSL/TLS
  • Use Authentication & Authorization
View Curriculum
Requirements
  • Fair knowledge of Java
  • Eclipse IDE
  • Java SE 8
  • Java EE 7
  • Knowledge of XML/JSON
Description

Update:  Use Payara Server rather than GlassFish, info in Section 1

Update: Apache Tomcat, SSL, Authorization and Authentication in Section 9

Update:  MySQL DB and Apache Tomcat in Section 10

Update: JavaFX to REST Example in Section 11

This course walks the student through general web service concepts, then focuses on RESTful web services. We will write both a service and clients, process JSON and XML, and test using cURL.

This course covers the following topics:

  • Web Service Concepts
  • JAX-RS
  • Calling a Web Service
  • Writing a Web Service
  • Processing XML/JSON
  • Using the xjc Schema Compiler
  • Using cURL
  • SSL
  • Authentication & Authorization
  • JavaFX to REST Example
  • Apache Tomcat and CXF

The application server initially used is GlassFish since GF is the reference implementation for Java EE.  Section 8 covers the above topics using Apache Tomcat and CXF as the application server.

The environment used for this course includes:

  • Java SE 8
  • Java EE 7
  • Eclipse IDE
  • GlassFish/Payara Server
  • Apache Tomcat
Who is the target audience?
  • Professionals
  • Students
  • Developers with a Java background
Students Who Viewed This Course Also Viewed
Curriculum For This Course
51 Lectures
04:41:15
+
Introduction and Course Information
2 Lectures 07:58

Install the Payara application server, a GlassFish clone, but better maintained.

Preview 06:36
+
Getting Started
3 Lectures 19:18

Show where 'web services' and REST fit into Java EE.

Web Services and Java EE
00:13

Cover web service and REST concepts.

REST Concepts
14:32

Download the JAX-RS and JSONP libraries and add them to 'user libraries' in Eclipse.

Downloading JAX-RS (Jersey) & JSONP
04:33
+
Write a REST Client
8 Lectures 29:52

Setup a REST client template.

NOTE: When setting up a project, be sure to add all the jar files that come in the JAX-RS zip file. Currently, the zip file has three directories. Go into each directory and add the jars.

Setting up the Project
04:05

Alternative URLs to Use
00:36

Call an exchange rate service.

Call a JSON Exchange Rate Service
05:37

Parse the JSON returned from the exchange rate service.

Parse the JSON Exchange Rate File
04:36

Call a Holiday XML Service
06:17

Parse the Holiday XML File
07:32

Activity - Practice Writing a Client
00:59

Resources
00:10
+
Write a REST Service
7 Lectures 59:30

Decide what the URLs and data formats will be.

Planning a REST Service
05:30

GlassFish Error - Please Read
00:27

Sections:

  • Create a Dynamic Web Project
  • Configure the Project Facets
  • Write the Food class
  • Write the FoodList class
  • Write the FoodManager class
  • Write the FoodRestService class
  • Write the ApplicationConfig class
Write the Food Manager Application
14:52

Annotate and deploy the service.

Annotate the Food REST Service Class
04:56

Setup cURL and deploy the project.

Download cURL and Deploy the Rest Service
07:24

Test the REST service by sending get/put/post/delete commands using cURL.  Send/receive data as XML or JSON.

Test the Service with cURL
07:50

Write a client and JUnit tests:

00:10 - Start
03:59 - Write the Constructor
06:29 - 'getAll' Method
08:26 - 'get' Method
10:51 - 'post' Method
14:08 - 'put' Method
16:36 - 'delete' Method


Test the Service using a Java Client
18:31
+
Conclusion
1 Lecture 01:30

Summary of main topics.

Summary
01:30
+
Bonus I - Using SSL/TLS
3 Lectures 02:33
Securing the Server
00:53

Securing the Client
01:35

Resources
00:04
+
Bonus II - Authentication & Authorization
3 Lectures 23:58
Authentication & Authorization Concepts
04:08

Timeline

00:25 - GlassFish Admin Console
01:43 - GlassFish Security Realms
04:28 - glassfish-web.xml
07:02 - web.xml
10:10 - ApplicationConfig class
12:25 - FoodRestService class

Server-Side Authentication & Authorization
16:10

Client-Side Authentication
03:40
+
Combining SSL & Authentication
1 Lecture 05:57
SSL & Authentication
05:57
+
Bonus III - Apache Tomcat and REST
12 Lectures 55:07
Introduction
00:07

Installation
04:11

Eclipse Installation
01:57

CXF Installation
02:59

CXF Eclipse Installation
02:02

Create an Eclipse CXF REST Project I
02:08

Create an Eclipse CXF REST Project II
03:53

SSL - Server
11:03

SSL - CXF Application
04:29

SSL - REST Client
04:54

Eclipse TCP/IP Monitor
08:39

Authentication and Authorization
08:45
+
Bonus IV - REST Example using MySQL and Apache
4 Lectures 24:04
Introduction
07:37

Download and Install Apache Tomcat
04:23

Download and Install MySQL
06:47

Setup and Run the Project
05:17
1 More Section
About the Instructor
Taylor Corey
4.4 Average rating
254 Reviews
2,027 Students
1 Course
Software Engineer & Mentor

I have 25+ years experience in software development. Seven years with embedded systems and 18 years in the object oriented industry. Companies include banking, finance, telecom, and a product vendor. Jobs ranged from gathering requirements and turning them into working software, to mentoring others learning OO programming and design. I currently reside in the southeast United States near Research Triangle Park, NC.