On Wed October 14 2009 5:43:08 am Malte Finsterwalder wrote: > Hi, > > I let Cxf verify the incoming request against an XSD. > When Cxf finds an error in the request, it generates an error response. > In that case I would like to create a custom response, which needs to > include data from the invalid request. > > Can someone give me a hint, which hook I should look at, to pull this off?
You would probably need to write an interceptor that lives very early in the FaultOutChain that would take the fault that was generated from the validation stuff and remap it into a SoapFault that is more appropriate to what you want to accomplish. The biggest hurdle is the "include data from the invalid request" part. Since the incoming data is streamed in while validating, once the validation exception is thrown, it's gone. Thus, you may need to add an interceptor on the In chain that saves the data. Possibly a subclass of the LoggingInINterceptor or maybe the SAAJInInterceptor or similar. -- Daniel Kulp [email protected] http://www.dankulp.com/blog
