venerdì 30 giugno 2017

JAX-RS : Produce and consume XML and JSON messages with RestEasy

In this post we will use a more advanced JAX-RS features like produce and consume JSON an XML messages. The application demo simulates a news service exposing a RestEasy service, inside JBoss Wildlfly, that allows the use of the following methods:
  1. Add a news
  2. List all news
  3. Get a particular news using the news title
While we doesn't have problems about JSON messages generation, we have to pay attention about XML messages. In order to build an XML message we need to use XML annotations as showed in the video tutorial. Rest clients have some dependencies:
  1. HTTP Client
  2. Commons IO
So you must download and add this libraries  in your classpath as showed at the start of the video.

Nessun commento:

Posta un commento