Hi

I'm using a CXF 2.1.3 client, and I'd like to be able to log various
request envelope fragments to a flat file : my usecase is that I need
to generate a csv file with values from various request elements.

So far, I did not find a simple solution for this : I'm using an
outinterceptor, but I did not understand which phase I should bind to
in order to get the request soap envelope, nor how I could obtain an
XML representation of the request : for those who know Axis1, I'm
basically looking for the CXF equivalent of a very simple
SOAPEnvelope.getAsDocument() method within an Axis1 request handler.

I noticed https://issues.apache.org/jira/browse/CXF-1887 has been
fixed for 2.1.4, but since I'm using 2.1.3, what I did for now is to
reuse the source code of the LoggingOutInterceptor in my interceptor,
and play around the transform() method to get an XML document, then
use XPath to lookup fragments.

This works, but I'm not really proud of my code - sigh - and I feel
like there has to be a better solution.

Does anyone have a working example of a client outinterceptor being
able to access the outgoing request as an XML document ?

Thanks if you can help :)
laurent

-- 
<a href="http://in-pocket.blogspot.com";>http://in-pocket.blogspot.com
- Mobile world, technology and more</a>

Reply via email to