jersey and jax-rs

9

Click here to load reader

Upload: eduardo-pelegri-llopart

Post on 10-May-2015

5.642 views

Category:

Technology


4 download

DESCRIPTION

A mini-overview of JAX-RS, the JCP standard for RESTful applications, and Jersery, its production-quality reference implementation

TRANSCRIPT

Page 1: Jersey and JAX-RS

JAX-RS and Jersey

Marc Hadley and Paul SandozSun Microsystems

Page 2: Jersey and JAX-RS

HEAD /JAX-RS

● Java API for RESTful Web Services● Annotation-based server-side API● Servlet or SE deployment

● 1.0 finalized end of September 2008● Online Spec and API

● 1.1 planned to integrate with new Java EE 6 features

● Five open source implementations already● Jersey, JBoss RESTEasy, Restlet, Apache CXF,

Triaxrs

Page 3: Jersey and JAX-RS

GET /JAX-RS/Example

@Path("widgets/{id}")@Produce("application/widgets+xml")@Consumes("application/widgets+xml")public class WidgetResource {

private Widget w;

public WidgetResource(@PathParam("id") String id) { this.w = locateRecord(id); }

@GET Widget getWidget() { return w; }

@PUT Widget updateWidget(Widget update) { w = processUpdate(update); return w; }}

Page 5: Jersey and JAX-RS

GET /Glassfish/v3/Prelude

Page 6: Jersey and JAX-RS

GET /NetBeans/6.5

Page 7: Jersey and JAX-RS

GET /Samples

● Many samples are provided with the release● Atom, JAXB, JSON, Scala, Spring, WADL, …● Using GlassFish (+embedded) and Grizzly

● Download the 1.0 samples zip● Samples are maven-based● Works with NetBeans 6.x + maven plugin● Individual sample zip file are also available

– e.g. Sparklines, Mandel

Page 8: Jersey and JAX-RS

GET /Involved

● Ask/answer questions, propose fixes/features● mailto:[email protected]

http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users