Jakarta RESTful Web Services

Last updated
Jakarta RESTful Web Services (JAX-RS)
Original author(s) Sun Microsystems
Developer(s) Eclipse Foundation
Stable release
3.0 / June 30, 2020;3 years ago (2020-06-30)
Repository
Written in Java
Operating system Cross-platform
Platform Java
Type Application framework
License EPL 2.0 or GPL v2 w/Classpath exception
Website projects.eclipse.org/projects/ee4j.jaxrs OOjs UI icon edit-ltr-progressive.svg

Jakarta RESTful Web Services, (JAX-RS; formerly Java API for RESTful Web Services) is a Jakarta EE API specification that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. [1] JAX-RS uses annotations, introduced in Java SE 5, to simplify the development and deployment of web service clients and endpoints.

Contents

From version 1.1 on, JAX-RS is an official part of Java EE 6. A notable feature of being an official part of Java EE is that no configuration is necessary to start using JAX-RS. For non-Java EE 6 environments a small entry in the web.xml deployment descriptor is required.

Specification

JAX-RS provides some annotations to aid in mapping a resource class (a POJO) as a web resource. The annotations use the Java package jakarta.ws.rs (previously was javax.ws.rs but was renamed on May 19, 2019 [2] ). They include:

In addition, it provides further annotations to method parameters to pull information out of the request. All the @*Param annotations take a key of some form which is used to look up the value required.

JAX-RS 2.0

In January 2011 the JCP formed the JSR 339 expert group to work on JAX-RS 2.0. The main targets are (among others) a common client API and support for Hypermedia following the HATEOAS-principle of REST. In May 2013, it reached the Final Release stage. [3]

On 2017-08-22 JAX-RS 2.1 [4] specification final release was published. Main new supported features include server-sent events, reactive clients, and JSON-B. [5]

Implementations

Implementations of JAX-RS include: [6]

Related Research Articles

Jakarta Enterprise Beans is one of several Java APIs for modular construction of enterprise software. EJB is a server-side software component that encapsulates business logic of an application. An EJB web container provides a runtime environment for web related software components, including computer security, Java servlet lifecycle management, transaction processing, and other web services. The EJB specification is a subset of the Java EE specification.

<span class="mw-page-title-main">Jakarta EE</span> Set of specifications extending Java SE

Jakarta EE, formerly Java Platform, Enterprise Edition and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web services. Jakarta EE applications are run on reference runtimes, which can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components they are deploying.

Java Platform, Standard Edition is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).

Java XML is a mark up language for marking up the structure of a text document. The Java programming language XML APIs developed by Sun Microsystems consist of the following separate computer-programming APIs:

<span class="mw-page-title-main">Jakarta Servlet</span> Jakarta EE programming language class

A Jakarta Servlet, formerly Java Servlet is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web applications on web servers and thus qualify as a server-side servlet web API. Such web servlets are the Java counterpart to other dynamic web content technologies such as PHP and ASP.NET.

Jakarta Faces, formerly Jakarta Server Faces and JavaServer Faces (JSF) is a Java specification for building component-based user interfaces for web applications. It was formalized as a standard through the Java Community Process as part of the Java Platform, Enterprise Edition. It is an MVC web framework that simplifies the construction of user interfaces (UI) for server-based applications by using reusable UI components in a page.

Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices and service-oriented networks. Those resources are represented by objects called MBeans. In the API, classes can be dynamically loaded and instantiated. Managing and monitoring applications can be designed and developed using the Java Dynamic Management Kit.

Jakarta XML Binding is a software framework that allows Java EE developers to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and the inverse, i.e. to unmarshal XML back into Java objects. In other words, JAXB allows storing and retrieving data in memory in any XML format, without the need to implement a specific set of XML loading and saving routines for the program's class structure. It is similar to xsd.exe and XmlSerializer in the .NET Framework.

Apache Beehive is a discontinued Java Application Framework that was designed to simplify the development of Java EE-based applications. It makes use of various open-source projects at Apache, such as XMLBeans. Apache Beehive uses Java 5, including JSR-175, a facility for annotating fields, methods, and classes so that they can be treated in special ways by runtime tools. It builds on the framework developed for BEA Systems WebLogic Workshop for its 8.1 series. BEA later decided to donate the code to Apache.

XML Interface for Network Services (XINS) is an open-source technology for definition and implementation of internet applications, which enforces a specification-oriented approach.

The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. The framework does not impose any specific programming model.. The framework has become popular in the Java community as an addition to the Enterprise JavaBeans (EJB) model. The Spring Framework is free and open source software.

The Jakarta XML Web Services is a Jakarta EE API for creating web services, particularly SOAP services. JAX-WS is one of the Java XML programming APIs.

Jakarta Persistence, also known as JPA is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications.

The Web Application Description Language (WADL) is a machine-readable XML description of HTTP-based web services. WADL models the resources provided by a service and the relationships between them. WADL is intended to simplify the reuse of web services that are based on the existing HTTP architecture of the Web. It is platform and language independent and aims to promote reuse of applications beyond the basic use in a web browser. WADL was submitted to the World Wide Web Consortium by Sun Microsystems on 31 August 2009, but the consortium has no current plans to standardize it. WADL is the REST equivalent of SOAP's Web Services Description Language (WSDL), which can also be used to describe REST web services.

Apache CXF is an open source software project developing a Web services framework. It originated as the combination of Celtix developed by IONA Technologies and XFire developed by a team hosted at the now defunct host CodeHaus in 2006. These two projects were combined at the Apache Software Foundation. The name "CXF" was derived by combining "Celtix" and "XFire".

<span class="mw-page-title-main">Spring Roo</span> Open-source software tool

Spring Roo is an open-source software tool that uses convention-over-configuration principles to provide rapid application development of Java-based enterprise software. The resulting applications use common Java technologies such as Spring Framework, Java Persistence API, Thymeleaf, Apache Maven and AspectJ. Spring Roo is a member of the Spring portfolio of projects.

Restful Objects is a standard covering RESTful interfaces to domain object models. The specification is published under a Creative Commons license.

Jakarta Web Services Metadata, as a part of Jakarta XML Web Services (JAX-WS), is a Java programming language specification (JSR-181) primarily used to standardize the development of web service interfaces for the Jakarta EE platform.

<span class="mw-page-title-main">Eclipse Jersey</span> Software framework

The Jersey RESTful Web Services, formerly Glassfish Jersey, currently Eclipse Jersey, framework is an open source framework for developing RESTful Web Services in Java. It provides support for JAX-RS APIs and serves as a JAX-RS Reference Implementation.

References

  1. Hadley, p. 1.
  2. "Rename package commit on Github". GitHub .
  3. "JSR 339: JAX-RS 2.0: The Java API for RESTful Web Services". Java Community Process .
  4. "JSR 370: Java API for RESTful Web Services (JAX-RS 2.1) Specification". Java Community Process .
  5. "JSR 367: Java API for JSON Binding (JSON-B)". Java Community Process .
  6. Little, Mark (October 1, 2008). "A Comparison of JAX-RS Implementations".

Tutorials