The easiest way to do this is to configure in the SAAJInInterceptor and then right an interceptor that would run fairly late in the chain that would do a message.getContent(Node.class) to get the full message. You can then pretty much do whatever you need to do with that DOM node to verify whatever content you need.
That might not be the best option for a production thing as using SAAJ involves bringing in the entire message, but for a unit test or similar, it's likely an easy option. Dan On Tuesday, May 31, 2011 11:38:23 PM bharal wrote: > Hey all, > > i'm very new to cxf. I'm working on a replatform at work from a home-grown > soap service to cxf. My question is: > > I'm writing a test case, and want to check, on the server-side, what the > sent soap body looks like. That is, i'd like to reconcile that against what > the client added to the soap body. > > So, given this soap message: > <soap:envelope... > <soap:header... > <soap:body> > <someElement> > <child>text</child> > /someElement> > </soap:body> > <soap:header> > > I'm trying to use an in-interceptor on the server side - if that is the > right way to do it - to pull out the "someElement" as an element, and then > reconcile that with the element that the test case initially added. > Yes, they should be identical. > > Can some kind soul give me the interceptor code to do this, or in the very > least which phase this is meant to be in? Or if this is even feasible? > Or failing that, where I can find such information? I've worked out how to > add and retrive headers - http and soap - but cannot work out how to access > the action! > > cheers > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/How-do-i-get-the-soap-action-tp4444089p444 > 4089.html Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
