rest

JAX-RS Annotations Explained

In this example we shall learn some important JAX-RS annotations. To understand this tutorial, following is the prerequisite knowledge required: Basic knowledge of how to use annotations Basic REST Architecture Table Of Contents 1. JAX-RS Annotations 1.1. @Path 1.2. @PathParam 1.3. @GET 1.4. @POST 1.5. @PUT 1.6. @DELETE 1.7. @Consumes 1.8. @Produces 1.9. @QueryParam 2. Download the source code 1. ...

Read More »

Java JSON RESTful Web Service Example

In this example we shall learn implementing Restful Web Service in Java where the data interchange format shall be JSON. 1. Introduction to RESTful Web Services RESTful Web Services follow REST architecture which stands for REpresentational State Transfer. RESTful web services are light weight and highly scalable is one of the most common way to create APIs on web. In ...

Read More »

Creating JAX-RS web service using Jersey Example

Introduction Jersey as it states in the website, is more than just a reference implementation. It also has it’s own API that extends the specification toolkit with additional wrapped features and utilities to simplify RESTful service and client development. It also exposes numerous extension SPIs so that developers may extend Jersey to best suit their needs. For this post, we’re ...

Read More »

Creating JAX-RS web service using RESTEasy Example

Introduction RESTEasy is a JBoss Project and an implementation of JAX-RS specification.  It’s simplified nature made a huge noise on the backend developers community and to this day, one of the widely used JAX-Rs implementation. How easy is it? Let’s find out. What are we doing? We are doing a step by step guide on how to create a RESTEasy ...

Read More »

Creating JAX-RS web service using Apache CXF Example

Ever since JAX-RS was introduced (JSR-311), it had a profound effect on the architecture and design of web services. It’s simplified scheme of creating an exposable service had really made an impact to how developers create web services as well as how it’s being used on the micro-service architecture. With this, a lot of service frameworks was introduced to create ...

Read More »

RESTful Java Client With java.net.URL

In this example we are going to see how you can use java.net package utilities, to create RESTful  clients that can consume simpele REST Services. It is not the easiest way to create a RESTful client, as you have to read the response yourself, as well as marshal and unmarshal Java Objects to some kind of stream, if that’s what ...

Read More »

JSON Example With RESTEasy + JAXB + Jettison

In this tutorial we are going to see how you can integrate RESTEasy with Jettison to develop JAX-RS RESTful services that produce and consume JSON streams. As you probably know, Jettison is a collection of APIs that are used to read and write JSON formatted streams. It can be coupled with XML serialization frameworks, like XStream, or JAXB used to marshal ...

Read More »

JSON Example With RESTEasy + Jackson

In this tutorial we are going to see how you can integrate RESTEasy with Jackson to develop JAX-RS RESTful services that produce and consume JSON streams. As you probably know, Jackson is used to marshal a Java Object to JSON, and ummarshal a JSON file (or stream in general) to a Java Object In this example we are not going ...

Read More »

JSON Example With Jersey + Jackson

In this tutorial we are going to see how you can integrate Jesrsey with Jackson to develop  JAX-RS RESTful services that produce and consume JSON streams. As you probably know, Jackson is used to marshal a Java Object to JSON, and ummarshal a JSON file (or stream in general) to a Java Object In this example we are not going to ...

Read More »

XML Example With RESTEasy+ JAXB

In this example we are going to see how you can integrate RESTEasy with JAXB (Java Architecture for XML Binding) to create RESTful services that consume and produce XML streams. As you probably know JAXB is used to marshal a Java Object to XML, and ummarshal an XML file (or stream in general) to Java Object. In this example we are not going ...

Read More »