MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
avishaic
Post subject: Error MIME media type application/xml was not found  PostPosted: Sep 07, 2010 - 10:01 AM



Joined: Sep 02, 2010
Posts: 10

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
Code:
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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-shalini
Post subject: RE: Error MIME media type application/xml was not found  PostPosted: Sep 08, 2010 - 05:05 AM
Registered Member
Registered Member


Joined: May 18, 2009
Posts: 1532

A,
You will have to provide more information to Jersey to serialize and deserialize your list.
Please refer to the following link for further information -
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-22888.html

_________________
Shalini
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits