Posts

Showing posts from December, 2012

RESTful WebService Tutorial

Representational State Transfer  ( REST ) is a style of  software architecture  for  distributed  systems such as the  World Wide Web . REST has emerged as a predominant  Web service  design model. We will be building a REST application using Apache tomcat , Jersey , Eclipse . Below is the code for making a dummy application for Restful WebService using Jersey. To begin with first set up all the jars required for the application.  Click the below link to download all the jars. https://sites.google.com/site/balonideepak/lib.zip?attredirects=0&d=1 After that  create a client for making a hit to the app. Create a class like JerseyGetClient.java and paste the below code inside it : import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; import com.sun.jersey.api.client.WebResource.Builder; public class JerseyGetClient { public static void main(String arg[]