Samples JDK
TicketsResource.java
1 package com.freemindcafe.apache.cxf.jaxrs.sample3;
2 
3 import java.util.ArrayList;
4 import java.util.List;
5 
6 import javax.ws.rs.GET;
7 import javax.ws.rs.Produces;
8 import javax.ws.rs.core.MediaType;
9 
10 
11 public class TicketsResource {
12 
13  @GET
14  @Produces(MediaType.APPLICATION_JSON)
15  public List<Ticket> getTickets(){
16  Ticket ticket1 = new Ticket("nikhil", "desc");
17  List<Ticket> tickets = new ArrayList<Ticket>();
18  tickets.add(ticket1);
19  return tickets;
20  }
21 
22 }