Jakarta Web Services

Jakarta Web Services

2h 50mIntermediate2023-10-02

Authors

Buddhini Samarakkody

Buddhini Samarakkody

Java Engineer, Author, Instructor

Course details

Get started quickly with Jakarta Web Services. In this course, Java engineer, author, and instructor Buddhini Samarakkody gives an overview to Web Services and Web Services specific to Jakarta EE. Buddhini goes over how to set up the environment to get started building a simple RESTful API and shows you how to build and run a REST API for performing CRUD functions in an application. She covers how to finetune some of those Jakarta RESTful web services by performing validations, as well as how to handle exceptions and secure them. Buddhini also discusses and demonstrates the possibility of running RESTful applications in a Java SE environment.

Skills covered

Jakarta EEBack-End Web DevelopmentWeb DevelopmentOne-Off

Concepts

Introduction

  • Jakarta Web Services - Integrating applications over the internet
  • What you should know

Web Services - What and Why

  • What is a web service
  • Why are web services needed
  • APIs, web services, and endpoints

Web Services in Jakarta EE

  • REST and SOAP
  • XML SOAP-based vs. RESTful web services
  • RESTful and XML SOAP-based web service use cases
  • History of web services - From Java EE to Jakarta EE
  • What's new in Jakarta EE for web services
  • The cloud-native focus in Jakarta web services

Set the Stage to Build a REST API

  • CRUD and HTTP methods
  • Create and configure a basic web application
  • Configure Jakarta RESTful Web Services
  • Add a Resource class

Build the REST API for the Read Action

  • Implement resource method for reading - HTTP GET
  • Use path parameters
  • Use query parameters
  • Explore response value types - Media types
  • Media types in action
  • ResponseBuilder and methods
  • Control the response via ResponseBuilder
  • Challenge - Travel app
  • Solution - Travel app

Build the REST API for Create, Update, and Delete Actions

  • Use HTTP POST for the CREATE action
  • Use HTTP PUT for the UPDATE action
  • Use HTTP DELETE for the DELETE action
  • Challenge - Travel app
  • Solution - Travel app

Fine-Tune Your Jakarta RESTful Web Services

  • Validate your REST endpoints
  • Perform single field validations in REST
  • Perform custom validations in REST
  • Handle exceptions in REST endpoints
  • Implement security in REST endpoints

RESTful Applications in the Java SE Environment

  • The Java SE bootstrap API
  • Create and configure the Java SE app
  • Build the RESTful application
  • Run the application and test the endpoint

Conclusion

  • Next steps
80,000 Toman