On Wednesday 28 April 2010 11:06:25 am Steven Thein wrote: > Hi > I noticed that the PhaseInterceptorChain is different in CXF-2.2.7 than in > CXF-2.2.2 Is that the reason it return nulll when I call > message.getContent()?
If you need the SAAJ model, you would need to also configure in the SAAJOutInterceptor which sets things up to write to the SAAJ model instead of directly to the stream. I'm honestly not sure why it works with 2.2.2. Did you have a JAX-WS SOAP Handler registered with 2.2.2 that you might not with 2.2.7? Most of the differences were around removing all the JAX_WS interceptors from the chain if there aren't any jaxws handlers registered. Dan > > Steve > > > CXF2.2.7 > > Chain org.apache.cxf.phase.phaseinterceptorch...@a68e82. Current flow: > setup [PolicyOutInterceptor] > pre-logical [HolderOutInterceptor, SwAOutInterceptor, > WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor] post-logical > [SoapPreProtocolOutInterceptor] > prepare-send [MessageSenderInterceptor] > pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor, > StaxOutInterceptor] write [SoapOutInterceptor] > marshal [WrappedOutInterceptor, BareOutInterceptor] > post-marshal [SecurityOutboundIntercepter] > write-ending [SoapOutEndingInterceptor] > pre-stream-ending [StaxOutEndingInterceptor] > prepare-send-ending [MessageSenderEndingInterceptor] > > > CXF 2.2.2 > Chain org.apache.cxf.phase.phaseinterceptorch...@664140. Current flow: > setup [PolicyOutInterceptor] > pre-logical [HolderOutInterceptor, SwAOutInterceptor, > WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor] post-logical > [SoapPreProtocolOutInterceptor] > prepare-send [MessageSenderInterceptor] > pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor, > StaxOutInterceptor] pre-protocol [SOAPHandlerInterceptor] > write [SoapOutInterceptor] > pre-marshal [LogicalHandlerOutInterceptor] > marshal [WrappedOutInterceptor, BareOutInterceptor] > post-marshal [SecurityOutboundIntercepter] > user-protocol [] > write-ending [SoapOutEndingInterceptor] > > -----Original Message----- > From: Steven Thein > Sent: Wednesday, April 28, 2010 7:47 AM > To: [email protected] > Subject: SoapMessage-getContent method returning nulll in CXF-2.2.7 > > Hi, > > I have a client side outbound interceptor added to the interceptor chain > with the following overridden method > > public void handleMessage(SoapMessage message) > > throws Fault > > { > > SoapVersion version = message.getVersion(); > > try > > { > > SOAPMessage soapMessage = message.getContent(SOAPMessage.class); > > WSSOAPEnvelope wsEnvelope = new > WSSOAPEnvelope(soapMessage.getSOAPPart().getEnvelope()); > > WSSecurity sec = WSSecurity.newInstance(wsEnvelope.getOwnerDocument()); > > . > > .. > > } > > In CXF2.2.7, message.getContent() returns null. Is this a bug in CXF2.2.7? > CXF2.2.2 returns valid value. Is there a different method that I can use > instead of getContent()? > > Thanks > > Steve -- Daniel Kulp [email protected] http://dankulp.com/blog
