This is my resource
@POST
@Path("contractinfo/search")
@Produces("application/xml")
public Response findMethod(Criterea)
where Criterea is a user defined object duly jaxb annotated. I have a
JAXBElementProvider as follows
@Provider
@Produces("application/xml")
@Consumes("application/xml")
public class JAXBElementProvider<T> implements MessageBodyReader<T>,
MessageBodyWriter<T>{
with the readFrom and writeTo properly coded (it works for 0.6 ). The
problem i am having is as follows
1. i upgraded from 0.6 to 1.0.3 (changed lot of stuff like annotations,class
locations,etc)
2. i am able to make a request to another uri
@GET
@Produces("text/plain")
@Path("ping")
public String ping() {
return "pong";
}
The client that i use is a client proxy which uses the uribuilder(still the
old way ) and with ping it goes and gets the pong response, but when i send
a request which sends the xml (with criterea) i get the following error in
the tomcat server logs
SEVERE: A message body reader for Java type, class <Class> , and MIME media
type, application/x-www-form-urlencoded, was not found
I added the mimepull as someone suggested but to no avail. I dont think that
it is using my provider. is there a way in which i need to register the
provider which has changed between 0.6 and 1.0.3 ?
How do i make the resource accept xmls ?
Please help
Cheers
Restuser