cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Thein <steven.th...@oracle.com>
Subject RE: SoapMessage-getContent method returning nulll in CXF-2.2.7
Date Thu, 29 Apr 2010 19:12:01 GMT
 Hi Dan,
	Which interceptor set the "content" values in SOAPMessage? I have added missing interceptors
for CXF2.2.7 in my code to be the same as for CXF2.2.2,  and I am still getting null value
when calling message.getContent().
Also how should I register JAX-WS SOAP Handler in CXF2.2.7?

Thanks
Steve




-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Wednesday, April 28, 2010 11:29 AM
To: users@cxf.apache.org
Cc: Steven Thein
Subject: Re: SoapMessage-getContent method returning nulll in CXF-2.2.7

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.PhaseInterceptorChain@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.PhaseInterceptorChain@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: users@cxf.apache.org
> 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
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message