On Thursday 04 November 2010 10:01:54 am KARR, DAVID (ATTSI) wrote:
> > -----Original Message-----
> > From: Daniel Kulp [mailto:[email protected]]
> > Sent: Wednesday, November 03, 2010 7:55 PM
> > To: [email protected]
> > Cc: KARR, DAVID (ATTSI)
> > Subject: Re: Best way to get XML string in interceptor
> > 
> > Well, if you write an interceptor that lives immediately after the
> > LoggingOutInterceptor, you should be able to grab the Outputstream,
> > cast it to
> > the CacheAndWriteOutputStream, add your callback.
> 
> By "grab the Outputstream", do you mean just doing the same thing LOI is
> doing:
> 
>         final OutputStream os = message.getContent(OutputStream.class);
> 
> Then casting that to CAWOS and registering a LoggingCallback which does
> my logging work?
> 
> Can I do this in two separate interceptors that both run after the LOI?


You should be able to, yes.    However, if something else replaces the output 
stream for some reason, then you obviously couldn't.   Not likely as the 
LoggingOut is usually one of the last things to replace the stream.


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

Reply via email to