cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Acevedo <>
Subject Re: customize error messages for bad input requests
Date Thu, 10 Apr 2014 21:23:22 GMT
On 2014-04-10 12:49, Jose MarĂ­a Zaragoza wrote:

> According exception 
> should be
> javax.validation.ConstraintViolationException or
> javax.validation.ValidationException
> How are you setting up Bean Validation feature  ?

I'm still trying to set it up, but that's not the problem.  I'm still 
trying to customize the response when CXF converts arguments to the 
native Java types; this isn't done by bean validation.  Per my original 

     @GET @PATH("/{foo}/{bar}")
     public Response foo(@PathParam("foo") Integer foo, 
@PathParam("bar") Integer bar) {
         ... do stuff ...

No bean validation is used here, this is just basic input parameter 
binding.  CXF throws a fairly generic ClientErrorException, which 
doesn't tell me that the problem is that input binding failed.

Ideally I'd like a solution that works for both bean validation (once I 
get that working) and input binding, but for now I don't see a way to do 
even the basic input binding error response handler.



View raw message