Overview of IBM JAX-RS
Java API for RESTful Web Services (JAX-RS) provides a model for developing services that follow Representational State Transfer (REST) principles. The IBM implementation of JAX-RS provides an implementation of the JAX-RS specification.
- REST and JAX-RS
REST is an architectural style that uses multiple standard technologies like HTTP, XML, ATOM, and HTML. REST is based on the notion of resources. A resource is simply any data to share on the web that we can identify by a Uniform Resource Identifier (URI).
Key features provided by JAX-RS include:
- A collection of annotations for declaring resource classes and the data types they support
- A set of interfaces that allow application developers to gain access to the runtime context
- An extensible framework for integrating custom content handlers
- Apache Wink and the IBM implementation of JAX-RS
Wink is a project developed within the Apache Software Foundation that provides a lightweight framework for developing RESTful applications. Wink supports REST services implemented using JAX-RS to describe the resources on the server. However, a client API is also provided by Wink. This client API is specific to the Wink runtime environment because there is no JAX-RS defined client API.
The IBM implementation of JAX-RS is an extension of the base Wink 1.1 runtime environment. IBM JAX-RS includes the following features:
- JAX-RS 1.1 server runtime
- Stand-alone client API with the option to use Apache HttpClient 4.0 as the underlying client
- Built-in entity provider support for JSON4J
- An Atom JAXB model in addition to Apache Abdera support
- Multipart content support
- A handler system to integrate user handlers into the processing of requests and responses
Plan to use JAX-RS to enable RESTful services Implement JAX-RS web applications Use XML content in JAX-RS application requests and responses Use JSON content in JAX-RS application requests and responses Use Atom content in JAX-RS application requests and responses Web services specifications and APIs JAX-RS: Java API for RESTful Web Services (JSR 311) Fielding, Roy Thomas. Architectural Styles and the Design of Network-based Software Architectures. Doctoral dissertation, University of California, Irvine, 2000, Chapter 5 Hypertext Transfer Protocol -- HTTP/1.1 specification