You would need to wire in the Logging interceptors or subclasses of the logging 
interceptors or similar that would capture the entire message and make it 
available.  By default, everything is streamed and is discarded as soon as it’s 
read.

Dan


> On Jun 11, 2015, at 5:28 AM, eddgrant <[email protected]> wrote:
> 
> Hi folks,
> 
> Using CXF 3.1.0 I am writing a JAX-WS service which uses JAXB bindings. My
> service has schema validation enabled, in the event that it receives a
> message which doesn't validate I want to be able to grab the entire request
> body and ship it off somewhere.
> 
> I found DefaultValidationEventHandler and had hoped that I would be able to
> access the request body in handleEvent(ValidationEvent) however the
> ValidationEvent passed doesn't contain the body.
> 
> The Service I'm writing is a Spring application so as an alternative
> approach I also tried @Autowiring the request scoped HttpServletRequest
> object in to my DefaultValidationEventHandler subclass, however I was unable
> to read the body from here as the stream has already been consumed.
> 
> Can anyone point me in the right direction here?
> 
> Many thanks,
> 
> Edd
> 
> 
> 
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/Handle-validation-errors-in-JAX-WS-service-and-obtain-whole-request-body-tp5758197.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to