Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-18 Thread tomstark
Yeah, I was a little surprised that manipulating the MessageContentsList directly didn't confuse the underlying layers. Seemed like I might have been potentially "pulling the rug out from underneath" the lower layers. Glad it worked. As for the validation sequence, although it seems as though

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-18 Thread Sergey Beryozkin
Thanks. By the way, I wonder if the fix in CXF will need to be different after all. See the JAXRS out interceptor validates the JAX-RS *method response*, and if the validation fails and the custom Response is created and the out chain is run again, the out validating interceptor now still

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-17 Thread tomstark
Slight mod to what you have: JAXRSUtils.getCurrentMessage().setContent(List.class, new MessageContentsList(resp)); Using the "put" method did not work but the above code works just fine and I was able to see the original outbound violations in an error response. Thanks. -- View this message

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-17 Thread Sergey Beryozkin
Right, in that case please try JAXRSBeanvalidationInvoker, or, may be even better, try to add this line in your exception mapper: JAXRSUtils.getCurrentMessage().put(List.class, new MessageContentsList(newResponse)); You will be able to remove this line once CXF-7091 gets resolved Thanks,

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-17 Thread tomstark
Tried the BeanValidationInInterceptor and BeanValidationOutInterceptor with the the Out interceptor configured like this: BeanValidationOutInterceptor bean = new BeanValidationOutInterceptor(); bean.setProvider(new BeanValidationProvider(new HibernateBeanValidationProviderResolver()));

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-14 Thread Sergey Beryozkin
Or try JAXRSBeanValidationInvoker (register it with jaxrs:invoker) Sergey On 14/10/16 22:17, Sergey Beryozkin wrote: Hi See https://issues.apache.org/jira/browse/CXF-7091 We are voting for a 3.1.8 release right now, so I can only guess at this stage that 3.1.9 will be out by the end of Dec or

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-14 Thread Sergey Beryozkin
Hi See https://issues.apache.org/jira/browse/CXF-7091 We are voting for a 3.1.8 release right now, so I can only guess at this stage that 3.1.9 will be out by the end of Dec or early January. Please try CXF interceptors in meantime Cheers, Sergey On 14/10/16 21:59, tomstark wrote: Hi

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-14 Thread tomstark
Hi Sergey, Thanks for the info. I'll try your suggestion. Do you have a time frame for when 3.1.9 would be released? Also, can you reply with the bug number so I can track it? Depending on timing, I may have to wait to pick up the fix until our next release. Thanks. -- View this message

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-14 Thread Sergey Beryozkin
Hi Yes, the response filters are expected to be run again after an exception has been mapped. The fact that the abstract CXF filter sees the original value on the 2nd run is a bug, in most case the default mapper which only creates an HTTP error is sufficient. So I guess this is why this