title: 415 Unsupported Media Type / Ticket Reservation System
body: <p>I write simple web-service which has 4 method: I stopped on getFilmList. When i run project i receives error in WizToolsRestClient: 415 Unsuported .., and in tomcat logs this:</p>
  
  <pre><code>sty 18, 2016 5:13:12 PM com.sun.jersey.spi.container.ContainerRequest getEntity
  SEVERE: A message body reader for Java class Request.Request, and Java type class Request.Request, and MIME media type application/json; charset=UTF-8 was not found.
  The registered message body readers compatible with the MIME media type are:
  application/json; charset=UTF-8 -&gt;
  </code></pre>
  
  <p>My method in DAO:</p>
  
  <pre><code> public List&lt;Film&gt; listFilms (Date date)
  {
      Session session = HibernateUtil.getSessionFactory().openSession();
      Transaction transaction = null;
  
      try{
          transaction = session.beginTransaction();
          Query query = session.createQuery("FROM film WHERE date = :date");
          query.setDate("date" , date);
          List&lt;Film&gt; films = query.list();
          return films;
      }
      catch (HibernateException e)
      {
          e.printStackTrace();
      }
      return null;
  }
  </code></pre>
  
  <p>Implementation in WebService:</p>
  
  <pre><code>@POST
  @Produces("application/json")
  @Consumes("application/json")
  @Path("/list")
  public Response getFilmList (Request request)
  {
      Response response = new Response();
  
      try {
          response.setFilms(dao.listFilms(request.getFilm().getDate()));
      }
      catch (HibernateException e)
      {
  
      }
      return response;
  }
  </code></pre>
  
  <p>Entity class Film:</p>
  
  <pre><code>@Entity
  @XmlRootElement
  @Table (name = "film")
  public class Film
  {
  @Id
  @Column (name = "id")
  @GeneratedValue (strategy = GenerationType.IDENTITY)
  private int id;
  @Column (name = "title")
  private String title;
  @Column (name = "date")
  private Date date;
  
  public Film() {}    //Constuctor
  
  // geter and seter
  </code></pre>
  
  <p>Request:</p>
  
  <pre><code>public class Request
  {
      Film film = new Film();
  
      public Request() {
      }
  
      // geter and seter
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>public class Response
  {
    private List&lt;Film&gt; films;
  
  
    public Response() {
   }
  </code></pre>
  
  <p>and my json </p>
  
  <pre><code>{
      "Film": 
      {
          "date" : "2016-01-21"
      }
  }
  </code></pre>
  
  <p>What I am doing wrong ?</p>