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: ParamCoverter, List, CSV query parameters

2016-10-17 Thread Sergey Beryozkin
Hi In the JAX-RS users thread which I referred to below I did ask about and I don't think I got a +1 from one the spec leads on having ParamConverterProvider supporting List, please check the archives. And as I said IMHO the converters should not deal with interpreting for ex the whole query

Re: ParamCoverter, List, CSV query parameters

2016-10-17 Thread Diego Ruotolo
Hi Sergey, I think you are definitively right when you say you don't want to introduce a CXF specific extension at a standard JAX-RS interface level. But taking a look at the JAX-RS specs it is not specified that ParamConverter should handle just single values in a collection and not the whole

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: ParamCoverter, List, CSV query parameters

2016-10-17 Thread Sergey Beryozkin
Hi Diego But that would introduce a CXF specific extension at a standard JAX-RS interface level. In general I'm quite open to adding new extensions but I'd rather not to in this case...Besides, IMHO, it really should be the job for the JAX-RS runtime, to parse the multivalued query/matrix

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: ParamCoverter, List, CSV query parameters

2016-10-17 Thread Diego Ruotolo
Hi Sergey, thanks for your answer. I think a good solution could be to pass the ParamConverter a string containing all the values of a multi-valued query parameter, and let the user build the collection object. So, if I have a query string like: MY_PARAM=VALUE_1=BAR_PARAM=VALUE_2, the

JAX-RS Client implementing a challenge/response authentication

2016-10-17 Thread Konrad Windszus
I want to call a ReST web service with a JAX-RS client based on CXF. That web service has a custom authentication based on cookies and challenge/response authentication. To get authenticated (i.e. whenever a regular call returns a 401) a dedicated GET request must be issued to get the

Re: ParamCoverter, List, CSV query parameters

2016-10-17 Thread Sergey Beryozkin
Hi Thanks for this query, let me redirect to the CXF users list. FYI, CXF JAX-RS runtime prepares a List itself and only expects ParamConverters if any to convert individual values. I believe RI (Jersey) will also act the same way - but I may be wrong now. You can check a "ParamConverter