Thursday, January 13, 2011

Consuming REST Web Service using Java and Jersey API

In this tutorial we will create a Java application which will consume REST Web Service.

The web service which will be consumed is developed in this post.


If you have created the Web Service that means you already download Jersey API.
We will need those API for our application.


Create a new java project. Name it "NoteJava"


Insert those Jersey API libraries in our build path.


Create a new java class. Name it "NoteJava.java"




Run the application.
Console will print xml data which you can use and parse for your application.

Its very simple!