On Wednesday 26 January 2011 11:53:14 pm Jason Pell wrote:
> Hi,
> 
> I would like to be able to use the bean validator (spring or
> hibernate) with jaxb 2 in cxf 2.3.2.  I am writing java first web
> services and I do not have a schema with which to validate jaxb for
> min / max length, etc constraints.  JSR 303 looks to fit the bill for
> what I am looking for.  The project I am developing has its own
> generator for jaxb beans and I can enhance this to include the bean
> validator annotations.  Anyone have any experience with tying this
> into cxf?
> 
> I figured i would ask before I dive into the code and try to figure it
> out myself.  I figure I might be able to hook the validator in
> immediately after the xml is converted to jaxb in the interceptor
> chain.

Yea.   the USER_LOGICAL phase is definitely designed for this.   You can call 
msg.getContent(List.class) to get the list of beans and run whatever you want 
on it.


-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to