cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: CXF3 BeanValidation - wadl2java @Valid
Date Thu, 08 Sep 2016 11:23:48 GMT
This can be revisited if a ParamConverter approach works - because 
ParamConverter will be needed for the service to work with such 
parameters (if you have them refer to complex types).

Sergey



On 08/09/16 12:20, J. Fiala wrote:
> Vjacheslav,
>
> Exactly, methods + complex parameters always get annotated with @Valid
> with beanValidation active.
>
> Query parameters never get @Valid.
>
> Best regards,
>
> Johannes
>
>
> Am 08.09.2016 um 12:51 schrieb Vjacheslav V. Borisov:
>> 2016-09-08 12:43 GMT+04:00 Sergey Beryozkin <sberyozkin@gmail.com>:
>>
>>>>> As I know, only xsd:enumeration types are projected to custom class by
>>>> default, all other simpleTypes projected to java.lang.String,
>>>> hower, if we map some xsd type to java class, then i think this should
>>>> work, but there is no such jaxb generator, to do such class generation
>>>> automatically, so this is also gigantic effort :)
>>>>
>>>> If the parameters can refer to the complex types (as opposed to simple
>>> types) then, with a BeanValidation aware JAXB plugin (the one linked to
>>> before), then a Java class with BeanVal annotations can be produced,
>>> this
>>> is what led to updating wadl-to-java adding @Valid annotations if
>>> "-beanValidation" option is set.
>>> Am I missing something ?
>>>
>> We are not using complex types in query parameters, only simple ones (and
>> as we discussed before implemeting validation of custom simpleType params
>> in not worth it)
>>
>> So, @Valid will be added to all Bean paramaters, including params
>> referring
>> to complexTypes and representations linked to root xsd elements.
>> And if i don't use complexTypes in query parameters, i get only payload
>> parameters annotated with @Valid?
>>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Mime
View raw message