Course in Java for REST Web Services Apps

Course in designing REST Web Services in Java

Web services based on the REST architecture is the modern way of designing server services. In this course you will learn how to implement both REST client-side as well as server-side applications.
This is what you will learn
  • Design your own REST-WS API
  • Use REST-WS command-line clients
  • Implement Java clients invoking REST web services
  • Implement XML, JSON, CSV and other forms of paylaod encoding
  • Design and implement REST-WS server applications
  • Design server applications using the SparkJava framework
  • Design REST-WS applications using JAX-RS annotated code and Jersey
  • Generate technical REST-WS documentation using Swagger
  • Implement authentication using JWT
  • Use the new HttpClient that was introduced in Java 11
  • Use the new exiting framework Micronaut to implement REST-WS servers
Course Contents


  • Understand the HTTP protocol
  • HTTP request operations
  • HTTP response codes
  • MIME types
  • Understand the HTTPS hand-shake


  • Understand the REST web services design idea
  • REST resource URIs
  • REST operations
  • Sub-resource URIs
  • REST anti-patterns to avoid


  • What is SOAP
  • Whats is WSDL
  • Sample SOAP request and response
  • Understand why SOAP is not used any more

Payload Encoding

  • Open-source libraries for XML
  • Open-source libraries for JSON
  • Overview of Simple XML
  • Parsing XML
  • Generating XML
  • Overview of GSON
  • Parsing JSON
  • Generating JSON
  • Using CSV as the payload encoding
  • Using Java Properties format as the payload encoding

Web Services CLI Tools

  • Why use CLI tools
  • cURL - standard HTTP tool
  • HTTPie - smart REST-WS tool
  • jq - smart JSON processing
  • json-server - quick back-end server
  • JSON PlaceHolder - fake back-end server

Java HTTP Client Invocations

  • Class URL
  • Class URLConnection
  • Class HttpURLConnection
  • Fetching data via HTTP GET
  • Pushing data via HTTP POST

Java REST Client Tools

  • Using David-Webb
  • Using RESTy

Setting up a Spark-Java Server

  • Overview of Spark-Java
  • Installation
  • Setting up routes
  • Handling JSON payload in the response
  • Handling JSON payload in the request
  • Designing CRUD REST operations
  • Dealing with exceptions
  • Best pratices

Groovy, Grails & Spock

  • Quick intro & motivation why using Groovy tools might be a good idea
  • Groovy - a super-set of Java (as in Java++)
  • Grails - a framework built on Spring & Hibernate, to create web-apps quickly
  • Spock - a versatile testing framework
  • Groovy REST-WS client


  • What is AJAX
  • What is asynchronous processing in JavaScript
  • Understanding XMLHttpRequest
  • Brief about jQuery


  • What is CORS
  • Request & response CORS headers
  • Understanding CORS pre-fligth operations
  • CORS client-server interaction

Annotations Based REST-WS with JAX-RS

  • What is JAX-RS
  • Resource annotations
  • HTTP method operations
  • URI paramters
  • Method parameter annotations
  • JAX-RS implementations
  • Using Jersy
  • Jersey payload encoding alternatives for JSON & XML
  • Using JSON-P
  • Using Moxy
  • Using a Grizzly embedded HTTP server for a Jersy app
  • CRUD operations in JAX-RS @ Jersy

Generated RES-WS Documentation with Swagger

  • What is Swagger
  • The Swagger architecture
  • Swagger JSON specification file
  • Swagger Editor
  • Swagger UI web-app
  • API annotations
  • How to create a REST-WS Jersey web-app with automatic and interactive documentation by Swagger

Authentication using JWT

  • What is a web token
  • How does JWT authentication work
  • Installation of jjwt
  • Using Java JWT
  • Typical use cases
  • Augmenting spark with an JWT authentication filter
  • Authentication online services

Authentication using OATH and a 3rd party

  • What is OAUTH
  • How can a user logon to my site by authenticating somewhere else
  • Installing of the SocialAuth Java library
  • Using Google as the provider
  • Setting up Spark-Java for 3rd party authentication

Using HttpClient

  • What is the new HttpClient
  • Synchronous vs. asynchronous mode
  • Simple HTTP operations
  • Handle response bodies
  • Perfoming async requests

Using Micronaut

  • What is Micronaut
  • Installation
  • Using the CLI
  • Using Micronaut annotations
  • Controllers
  • Deploying for microservices
  • Configuration
NameJava for REST Web Services Apps
Duration3 Days
AudienceJava programmers
PrerequisitesPractical knowledge in Java programming
  • Java JDK, version 12
  • JetBrains IntelliJ IDEA
Course Dates
2020-02-17Stockholm19 000 kr
2020-03-09Stockholm 19 000 kr
2020-03-30 Stockholm19 000 kr
2020-04-14Stockholm19 000 kr
2020-05-25Stockholm19 000 kr
2020-06-15Stockholm19 000 kr

Same-Company Discout

We offer a 20% discount for additional participants from the same company and at the same course date. Read more here.

Teaching Language

Our printed course material is always authored in English. The oral presentation in our classrooms is generally in Swedish, unless all participants agree to that we perform the course in English.

On-Site Course

If you order an On-Site course, we will come to you and hold the course in your office. The price is determined by our price model and is based on the number of course days, number of participants and any travel and lodging.

Read more about out price modell and term of sales here.

Related Courses
CourseDays Level
Java 8/9/...3IntermediateShow
Java Intermediate3IntermediateShow
Java Advanced 3AdvancedShow
Threads and Concurrency in Java2 Advanced Show
JUnit Tests1IntermediateShow
Spock Testing1IntermediateShow
Grails Web Apps5 BeginnerShow