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"
subject: Jaxrs webservice put and post methods return : HTTP/1.1 415 Unsupported Media Type error