RESTful Java Web Services

A guide to understanding, accessing, and writing a RESTful web service.
4.0 (135 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.
1,411 students enrolled
$19
$25
24% off
Take This Course
  • Lectures 52
  • Length 4.5 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 4/2015 English

Course Description

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

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

Update:  REST/MySQL/Apache Server Example in Section 9

Update: JavaFX to REST Example in Section 10

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

What are the requirements?

  • Fair knowledge of Java
  • Eclipse IDE
  • Java SE 8
  • Java EE 7
  • Knowledge of XML/JSON

What am I going to get from this course?

  • Understand Web Service Concepts
  • Write a REST Client in Java
  • Write a RESTful Web Service in Java
  • Use SSL/TLS
  • Use Authentication & Authorization

What is the target audience?

  • Professionals
  • Students
  • Developers with a Java background

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction and Course Information
How to make the most of this course
Preview
Article
06:36

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

Section 2: Getting Started
Article

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

14:32

Cover web service and REST concepts.

04:33

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

Section 3: Write a REST Client
04:05

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.

Alternative URLs to Use
Article
05:37

Call an exchange rate service.

04:36

Parse the JSON returned from the exchange rate service.

Call a Holiday XML Service
06:17
Parse the Holiday XML File
07:32
Activity - Practice Writing a Client
00:59
Resources
Article
Section 4: Write a REST Service
05:30

Decide what the URLs and data formats will be.

GlassFish Error - Please Read
Article
14:52

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
04:56

Annotate and deploy the service.

07:24

Setup cURL and deploy the project.

07:50

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

18:31

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


Activity - Practice Writing a Service
00:52
Section 5: Conclusion
01:30

Summary of main topics.

Section 6: Bonus I - Using SSL/TLS
Securing the Server
Article
Securing the Client
Article
Resources
Article
Section 7: Bonus II - Authentication & Authorization
Authentication & Authorization Concepts
04:08
16:10

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

Client-Side Authentication
03:40
Section 8: Combining SSL & Authentication
SSL & Authentication
05:57
Section 9: Bonus III - Apache Tomcat and REST
Introduction
Article
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
Section 10: Bonus IV - REST Example using MySQL and Apache
Introduction
07:37
Download and Install Apache Tomcat
04:23
Download and Install MySQL
06:47
Setup and Run the Project
05:17
Section 11: Bonus V - JavaFX to REST Example
Introduction
08:51
REST Client Overview
06:31
Setting up Eclipse
07:05
Using SceneBuilder
10:33
Dialog Example
06:22
JavaFX Client Example
10:06
Resources
Article

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Taylor Corey, 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.

Ready to start learning?
Take This Course