2012年2月2日 星期四

What is JAX-RS?

















  • JSR-311: JAX-RS

  • Java API for RESTful Web Services is a Java programming language API that provides support in creating web services according to the Representational State Transfer (REST) architectural style.

  • JAX-RS is an official part of Java EE 6
    Exposes named RESOURCES which represent DATA
    Resource: POJO ( anything that is addressable over the Web. By addressable, resources that can be accessed and transferred between clients and servers)
    URI path (A Uniform Resource Identifier in a RESTful web service is a hyperlink to a resource )

  • Emphasis on simple, stateless point-to-point communication over HTTP
    Uses Uniform interfaces in HTTP Methods

  • GET/PUT/POST/DELETE
    • Annotation-driven
    • @Path
    • @Produces/Consumes
    • @PathParam/FormParam
    • @GET/POST/PUT/DELETE

  • Implementations of JAX-RS include:
    Apache CXF, an open source Web service framework.
    Jersey, the reference implementation from Sun (now Oracle).
    RESTEasy, JBoss's implementation.
    Apache Wink, Apache Software Foundation Incubator project, the server module implements JAX-RS.


  • Sample
    Google Data Protocol
    Many services at Google provide external access to data and
    functionality through APIs that utilize it
    (http://code.google.com/apis/gdata/)
    Amazon’s Simple Storage Service (S3)
    (http://aws.amazon.com/s3)
    Most of Yahoo!’s web services
    (http://developer.yahoo.com/)

沒有留言:

張貼留言