RESTEasy

3,343 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,343
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
48
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

RESTEasy

  1. 1. RESTEasy Presented By, Khushbu M. Joshi Exam No.
  2. 2. Agenda Introduction What is REST? Why REST? Features of RESTEasy RESTEasy vs. Jersey Annotations Using Annotations Demonstration of Restful web service with RESTEasy References
  3. 3. Introduction Java API for RESTful Web Services Portable implementation that can run in any servlet container Jboss AS RESTEasy JAX-RS Client Framework
  4. 4. What is REST? REST Stands for REpresentational State Transfer. A concept, defined by Roy Fielding. Model each document and process as a resource (noun) with a unique URI. Everything has a unique URI.
  5. 5. Why REST? Scalable Human and machine usable Globally accessible resources Understandable URIs, resources, and actions.
  6. 6. Features Portable Client framework Rich set of providers GZIP content-encoding Rich interceptor model Security EJB, Spring integration Stateless Platform independence Lightweight
  7. 7. Features (cont.) Embedded container Client API Interceptor framework Data formats Component Integration
  8. 8. RESTEasy vs. JerseyRESTEasy JerseyEasier component Harder componentintegration integrationeasier for EJB 3.0 and easier for Spring and JSONSEAM integration integrationCan be used with any Can be used with Glassfishapplication server Application serverCan be used with any Can be used with HTTPprotocol
  9. 9. Annotations @Path @ProduceMime, @ConsumeMime @GET, @POST, @DELETE, @PUT, @HEADER @PathParam @QueryParam @HeaderParam @CookieParam @MatrixParam
  10. 10. How to use them? Producer //Base URI path to resource@Path(“/orders”)public class OrderService { //Extension to Base URI that the method maps to @Path(“/{order-id}”) //HTTP method @GET // returned content type @ProduceMime(“application/xml”) String getOrder(@PathParam(“order-id”) int id) { … }}
  11. 11. How to use them? (cont.) Consumer@Path(“/orders”)public class OrderService { @POST // expecting content type from client @ConsumeMime(“application/xml”) void submitOrder(String orderXml) { … }}
  12. 12. Reference Book: JBoss_Enterprise_Web_Platform-5- RESTEasy_Reference_Guide-en-US http://www.packtpub.com/article/restful-web-service- implementation-with- resteasy?utm_source=rk_javarest_abr1_1109&utm_medium= content&utm_campaign=ramsai http://www.ibm.com/developerworks/ http://www.h-online.com/open/news/item/RESTEasy-brings- REST-architecture-to-JBoss-739771.html http://my.safaribooksonline.com/book/programming/java/9781 847196460/resteasy-jax-rs/ch07lvl1sec03 https://community.jboss.org/wiki/RestEasyInJBossDeveloper StudioJBDSQuickstart Jboss.org http://technicalmumbojumbo.wordpress.com/2009/10/13/restf ul-webservices-using-jboss-resteasy-tutorial/

×