Estou tentando usar o unmarshalling automático de XML do RESTEasy. Criei minha classe com o xjc a partir do xsd e coloquei lá no meu servlet:
@POST
@Consumes( { "application/xml", "text/xml" })
public Response criarTeste(Teste teste) {
logger.info("criarTeste");
return Response.status(200).entity(teste.getDescricao()).build();
}
Só que aí quando eu faço o post dá o seguinte erro:
HTTP Status 400 - Could not find message body reader for type: class pacote.Teste of content type: text/xml;charset="UTF-8"
Alguém tem alguma idéia da causa?