Book Image

Java EE 7 Development with WildFly

Book Image

Java EE 7 Development with WildFly

Overview of this book

Table of Contents (21 chapters)
Java EE 7 Development with WildFly
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Developing REST-based web services


JAX-RS 2.0 (JSR-339 can be found at https://jcp.org/en/jsr/detail?id=339) is a JCP specification that provides a Java API for RESTful web services in the HTTP protocol. It is a major refresh from the old Version 1.1. Some of the new features are the client API, HATEOAS support, and asynchronous calls.

In their simplest form, RESTful web services are networked applications that manipulate the state of system resources. In this context, resource manipulation means resource creation, retrieval, updatation, and deletion (CRUD). However, RESTful web services are not limited to just these four basic data manipulation concepts. On the contrary, RESTful web services can execute logic at the server level but remember that every result must be a resource representation of the domain.

The main difference with SOAP web services is that REST asks developers to use HTTP methods explicitly and in a way that's consistent with the protocol definition. This basic REST design...