On Friday, February 24, 2012 2:05:02 PM Márcio Dantas wrote:
> Hi,
> I have an interceptor for soap messages and I want to log the entire
> incoming soap request as the original xml string.
> 
> Is there a way to get it from the SoapMessage object? Even if the xml is
> not valid?

Not normally, no.   By default, CXF streams the content directly from the 
transport into the JAXB (or other databinding) objects and the entire message 
is not available at any given time.   

The best option would be to look at the source for the LoggingInInterceptor 
and possibly adapt that to meet your needs.  It basically sucks in the entire 
stream into a buffer, logs the buffer, and then sets up a new stream that is 
used for the unmarshalling.

Dan


> 
> Or do I have to read the body of the http request using HttpServletRequest?
> 
> Thanks
> 
> Em 24/02/2012 10:28, "yebz" <[email protected]> escreveu:
> > Am trying to return a 201 http code with a Response.created() method, but
> > the
> > response body is always empty. ...
> > 
> > URI uri = new URI(uriInfo.getPath() + "/" + appID);
> > return Response.created(uri).entity(anyEntity).build();
> > 
> > any help?, thanks.
> > 
> > --
> > View this message in context:
> > http://cxf.547215.n5.nabble.com/Response-created-is-not-returning-response
> > -body-tp5512130p5512130.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