package dk.thoerup.webservice; import java.io.Serializable; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.xml.bind.annotation.XmlRootElement; @Path("/samples") public class RestSimpleJerseyTest { @Path("/simple") @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; } @Path("/json") @GET @Produces(MediaType.APPLICATION_JSON) public TestResponse getJSON() { return new TestResponse(1, "Hej"); } @Path("/xml") @GET @Produces(MediaType.APPLICATION_XML) public TestResponse getXML() { return new TestResponse(1, "Hej"); } }