I wrote a service similar to the tutorial “Developing REST Web Services Tutorial” and the server starts fine.
I call the getCustomers function from a browser (like in section 5.3 in the tutorial) I walk through the lines of code in the debugger and when I get to the final line of this function
public List<InfoCat> getCategories() {
List<InfoCat> catList = new ArrayList<InfoCat>();
catList.addAll(catMap.values());
return catList;
}
on the return catList;
I get this error
com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java type, class java.util.ArrayList, and MIME media type, application/xml, was not found
What am I doing wrong?
A.