File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Resteasy and Spring - howto register javax.xml.bind.ValidationEventHandler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Resteasy and Spring - howto register javax.xml.bind.ValidationEventHandler" Watch "Resteasy and Spring - howto register javax.xml.bind.ValidationEventHandler" New topic
Author

Resteasy and Spring - howto register javax.xml.bind.ValidationEventHandler

Maciej Miklas
Ranch Hand

Joined: Feb 12, 2007
Posts: 61
Hi,

I've registered custom XML Mappers with javax.xml.bind.annotation.adapters.XmlAdapter. Such mapper can throw exception - the problem is, that resteasy ignores such exception. I would like to break REST call and return error to the client.

To do that I need to register javax.xml.bind.ValidationEventHandler on Marschaller/Unmarschaller.

Does anyone know how to do that with Jboss resteasy? I am using resteasy servlet to process requests, this servlet creates Marschaller/Unmarschaller somwhere inside......

Thanks,
Maciek
Maciej Miklas
Ranch Hand

Joined: Feb 12, 2007
Posts: 61
This is the soluton (Spring+resteasy):

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resteasy and Spring - howto register javax.xml.bind.ValidationEventHandler
 
Similar Threads
JBoss-RESTEasy-Jackson problem
SCJP Logo
JAX-RS in JBoss 6 Final
How to write a RESTful web service with Eclipse tutorial that assumes very little?
Error with Spring MVC based REST service