facebook

Error MIME media type application/xml was not found

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #311152 Reply

    avishaic
    Member

    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.

    #311179 Reply

    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 –
    https://www.genuitec.com/forums/topic/restful-webservice-application-xml-mime-issue-workbench7/

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Error MIME media type application/xml was not found

You must be logged in to post in the forum log in