This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a basic CRUD webservice. The lookups (@GET methods) work but the create/edit/deletes are giving the Unsupported Media Type error ie:
SEVERE [org.jboss.resteasy.core.SynchronousDispatcher] (http--127.0.0.1-8080-3) Failed executing POST /Funds/create: org.jboss.resteasy.spi.UnsupportedMediaTypeException: Cannot consume content type
at org.jboss.resteasy.core.registry.Segment.match(Segment.java:117) [resteasy-jaxrs-2.3.2.Final.jar:]
I have tried different method signatures to no avail:
and the class signature for the Fund entity is:
Can anyone see anything obviously wrong with this?
I Lopes de Sarria
Joined: Oct 30, 2010
Resolved. In the client to test the call, i needed to add a header: Content-Type: application/xml and if receiving XML back then an additional Content-Type of "Accept"