title: Empty response body on request validation Error (Apache CXF, JAX-RS)
body: <p>I am using Apache CXF, JAX-RS and JSR-303 validation.
  Validation works properly, for invalid request objects I have HTTP 400 response and validation errrors in logs, but my response body is empty.
  How to have details about validation errors in response body?</p>
  
  <p>I use Spring Boot 1.5.6, Apache CXF 3.1.2.</p>
  
  <p>I setup CXF in java configuration</p>
  
  <pre><code>@Bean
  BeanValidationFeature commonValidationFeature() {
      return new BeanValidationFeature();
  }
  
  @Bean
  ValidationExceptionMapper exceptionMapper() {
      return new ValidationExceptionMapper();
  }
  
  @Bean
  JAXRSParameterNameProvider parameterNameProvider() {
      return new JAXRSParameterNameProvider();
  }
  
  @Bean
  BeanValidationProvider validationProvider() {
      return new BeanValidationProvider(parameterNameProvider());
  }
  
  @Bean
  JAXRSBeanValidationInvoker validationInvoker() {
      final JAXRSBeanValidationInvoker validationInvoker = new JAXRSBeanValidationInvoker();
      validationInvoker.setProvider(validationProvider());
      return validationInvoker;
  }
  
  @Bean
  JAXRSBeanValidationFeature validationFeature() {
      final JAXRSBeanValidationFeature feature = new JAXRSBeanValidationFeature();
      feature.setProvider(validationProvider());
      return feature;
  }
  </code></pre>
  
  <p>then I use those beans to setup  org.apache.cxf.endpoint.Server</p>
  
  <pre><code>JAXRSServerFactoryBean serverFactoryBean = new JAXRSServerFactoryBean();
          serverFactoryBean.setProvider(new JacksonJsonProvider(objectMapper));
          serverFactoryBean.setProvider(exceptionMapper());            
  serverFactoryBean.setFeatures(Arrays.asList(commonValidationFeature(), 
  swagger2Feature()));
          serverFactoryBean.setBus(bus);
          serverFactoryBean.setInvoker(validationInvoker());
          serverFactoryBean.setServiceBeans(Collections.singletonList(myApiImplementation));
          return serverFactoryBean.create();
  </code></pre>
  
  <p>How to have details about validation errors in response body? Are there some sensible defaults (like in Spring MVC?) Can I customize error response for validation errors?</p>