title: jersey.api.MessageException message body writer and MIME media type text/xml not found
body: <p>The data is an object named "QueryResponse" which in turn owns a list of objects called "Todos".</p>
  
  <p>I get this error:</p>
  
  <pre><code>javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message  body writer for Java class java.util.ArrayList, and Java type java.util.List&lt;de.vogella.jersey.todo.model.Todo&gt;, and MIME media type text/xml was not found
  </code></pre>
  
  <p>I have this jersey get method:</p>
  
  <pre><code>@GET
  @Produces({"application/xml", "application/json"})
  public QueryResponse getTodos() {
  
   List todos = new ArrayList();
   todos.addAll(TodoDao.instance.getModel().values());
   return  new QueryResponse(todos);
  }
  </code></pre>
  
  <p>And that's the QueryResponse object:</p>
  
  <pre><code>@XmlRootElement
  
  public class QueryResponse {
  @XmlElementWrapper(name = "Todos")
  @XmlElement(name = "Todo")
  private List&lt;Todo&gt; todolist;
  public QueryResponse(List&lt;Todo&gt; todolist)
  {
      this.todolist = todolist;
  }
  
  public void setTodolist(List&lt;Todo&gt; todolist)
  {
      this.todolist = todolist;
  }
  public List&lt;Todo&gt; getTodolist( )
  {
      return this.todolist;
  }
  }
  </code></pre>
  
  <p>And this is the Todo class:</p>
  
  <pre><code>public class Todo
  {
  
  
    private int id;
    private String summary;
    private String Description;
  
    public Todo()
   {
   }
  
    public Todo(int id, String summary)
   {
     this.id = id;
     this.summary = summary;
   }
   public int getId() {
     return this.id;
   }
   public void setId(int userID) {
     this.id = userID;
   }
   public String getSummary() {
     return this.summary;
   }
   public void setSummary(String summary) {
     this.summary = summary;
   }
   public String getDescription() {
     return this.Description;
   }
   public void setDescription(String description) {
      this.Description = description;
   }
  }
  </code></pre>
  
  <p>I appreciate your help.</p>