That could potentially work as long as you add the SAAJInInterceptor to the chain as well. By default, we don’t create the SAAJ object and instead stream directly. If you need the entire body like that, then configuring in the SAAJInInterceptor should work.
Dan > On Dec 20, 2016, at 6:02 AM, asifhasan1312 <[email protected]> wrote: > > Tried below code but it didn't work. > > ublic class SAAJCustomInterceptor extends > AbstractPhaseInterceptor<SoapMessage> { > public SAAJCustomInterceptor() { > super(Phase.POST_PROTOCOL); > } > > @Override > public void handleMessage(SoapMessage message) throws Fault { > System.out.println(message.getInterceptorChain()); > SOAPMessage soapMessage = message.getContent(SOAPMessage.class); > try { > Node rootNode = (Node) > soapMessage.getSOAPBody().getFirstChild(); > DOMUtils.writeXml((org.w3c.dom.Node) rootNode, > System.out); > > SOAPEnvelope env = > soapMessage.getSOAPPart().getEnvelope(); > DOMUtils.writeXml(env, System.out); > } catch (Exception e) { > e.printStackTrace(); > } > } > } > > Please help, if i am missing something or is there other way to get the soap > body object in interceptor > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/I-am-trying-to-get-soap-body-as-an-object-in-cxf-in-interceptor-tp5775936.html > Sent from the cxf-dev mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
