<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Continuing problem with XTS WS-T tests in AS trunk/CXF 2.2.9
</h3>
<span style="margin-bottom: 10px;">
    reply from <a href="http://community.jboss.org/people/adinn">Andrew Dinn</a> in <i>JBoss Web Services CXF</i> - <a href="http://community.jboss.org/message/548969#548969">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><blockquote class="jive-quote"><p>'ll follow up with progress on the results of making the changes I described above.</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Hmm, more regress than progress I am afraid.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The latest CXF stack wil dispatch from the client end the soap fault I am sending via the SoapFaultService . However, it will not deliver the fault to the target endpoint. This is not because the endpoint is masquerading as a SoapFaultService. Even if I were to install a pucker endpoint defined by my SoapFault service WSDL the current CXF would not deliver the message. Th eproblme is that the incoming message is actually a SoapFault and the incoming message chain assumes, invalidly, that it must relate to an outgoing request and ends up tripping over its own knickers with a null pointer exception.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The message gets received and routed to the relevant endpoint handler. Here is the stack trace for the exception which is causing mesage deliver to blow up:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p><span style="font-family: courier new,courier;">java.lang.NullPointerException<br/>&#160;&#160;&#160; at org.apache.cxf.interceptor.InFaultChainInitiatorObserver.addToChain(InFaultChainInitiatorObserver.java:62)<br/>&#160;&#160;&#160; at org.apache.cxf.interceptor.InFaultChainInitiatorObserver.initializeInterceptors(InFaultChainInitiatorObserver.java:59)<br/>&#160;&#160;&#160; at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:95)<br/>&#160;&#160;&#160; at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:142)<br/>&#160;&#160;&#160; at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:71)<br/>&#160;&#160;&#160; at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)<br/>&#160;&#160;&#160; at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)<br/>&#160;&#160;&#160; at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)<br/>&#160;&#160;&#160; at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423)<br/>&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:172)<br/>&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:57)<br/>&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:130)<br/>&#160;&#160;&#160; at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)<br/>&#160;&#160;&#160; at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)<br/>&#160;&#160;&#160; at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)<br/>&#160;&#160;&#160; at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)<br/>&#160;&#160;&#160; at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)<br/>&#160;&#160;&#160; at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:93)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br/>&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)<br/>&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)<br/>&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)<br/>&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)<br/>&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)<br/>&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:619)</span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So, things go all right up to the point where the <span style="font-family: courier new,courier;">SOAPHandlerInterceptor.handleMessage</span> gets invoked. It calls <span style="font-family: courier new,courier;">handleMessageInternal</span> which calls <span style="font-family: courier new,courier;">createProtocolMessageContext</span>. The latter looks for incoming reference parameters and then checks to see if the message body contains a soap fault.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><span style="font-family: courier new,courier;">protected MessageContext createProtocolMessageContext(SoapMessage message) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; SOAPMessageContextImpl sm = new SOAPMessageContextImpl(message);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Exchange exch = message.getExchange();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; setupBindingOperationInfo(exch, sm);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; SOAPMessage msg = sm.getMessage();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; try {&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; List&lt;SOAPElement&gt; params = new ArrayList&lt;SOAPElement&gt;();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; message.put(MessageContext.REFERENCE_PARAMETERS, params);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SOAPHeader head = msg.getSOAPHeader();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (head != null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Iterator&lt;Node&gt; it = CastUtils.cast(head.getChildElements());<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; while (it != null &amp;&amp; it.hasNext()) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Node nd = it.next();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (nd instanceof SOAPElement) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SOAPElement el = (SOAPElement)nd;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (el.hasAttributeNS(Names.WSA_NAMESPACE_NAME, "IsReferenceParameter")<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &amp;&amp; ("1".equals(el.getAttributeNS(Names.WSA_NAMESPACE_NAME,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "IsReferenceParameter"))<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; || Boolean.parseBoolean(el.getAttributeNS(Names.WSA_NAMESPACE_NAME,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "IsReferenceParameter")))) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.add(el);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (msg.getSOAPPart().getEnvelope().getBody() != null <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &amp;&amp; msg.getSOAPPart().getEnvelope().getBody().hasFault()) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return null;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; } catch (SOAPException e) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; throw new Fault(e);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return sm;<br/>&#160;&#160;&#160; }</span> <br/></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Since the incoming message is indeed a soap fault it returns null rather than a soap message context. Now this would be appropriate if the message was a fault being delivered as part of a RPC MEP or on the outbound side of a OneWay MEP exchange indicating a delivery problem. However, this is not the case. This fault is the payload of an incoming OneWay MEP message.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Because <span style="font-family: courier new,courier;">createProtocolMessageContext</span> returns <span style="font-family: courier new,courier;">null</span> <span style="font-family: courier new,courier;">handleMessageInternal</span> returns true without processing the message any further.</p><blockquote class="jive-quote"><span style="font-family: courier new,courier;">private boolean handleMessageInternal(SoapMessage message) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160; MessageContext context = createProtocolMessageContext(message);<br/>&#160;&#160;&#160; if (context == null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return true;<br/>&#160;&#160;&#160; }<br/>&#160;&#160;&#160; . . .</span><br/></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">handleMessage</span> goes on to set up an <span style="font-family: courier new,courier;">XMLStreamReader</span> on the <span style="font-family: courier new,courier;">SOAPMessage</span> and runs <span style="font-family: courier new,courier;">SAAJInterceptor.replaceHeaders</span> as per any incoming message and then, because it assumes this is a fault rather than a normal payload, aborts the current interceptor chain and runs the endpoint's incoming fault observer <span style="font-family: courier new,courier;">onMessage</span> routine which is where we enter the exception stack trace shown above.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; public void handleMessage(SoapMessage message) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (binding.getHandlerChain().isEmpty()) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (getInvoker(message).getProtocolHandlers().isEmpty()) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/><br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; checkUnderstoodHeaders(message);<br/><br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (getInvoker(message).isOutbound()) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (!chainAlreadyContainsSAAJ(message)) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SAAJ_OUT.handleMessage(message);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; message.getInterceptorChain().add(ending);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; } else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; boolean isFault = handleMessageInternal(message);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SOAPMessage msg = message.getContent(SOAPMessage.class);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (msg != null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; XMLStreamReader xmlReader = createXMLStreamReaderFromSOAPMessage(msg);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; message.setContent(XMLStreamReader.class, xmlReader);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // replace headers<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; try {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SAAJInInterceptor.replaceHeaders(msg, message);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } catch (SOAPException e) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; e.printStackTrace();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (isFault) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Endpoint ep = message.getExchange().get(Endpoint.class);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; message.getInterceptorChain().abort();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (ep.getInFaultObserver() != null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ep.getInFaultObserver().onMessage(message);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160; }<br/></span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The observer is an <span style="font-family: courier new,courier;">InFaultChainInitiatorObserver</span> whose onMessage method is inherited from super <span style="font-family: courier new,courier;">AbstractFaultChainInitiatorObserver</span>. This runs to the point where it calls <span style="font-family: courier new,courier;">initializeInterceptors</span> which eventually calls <span style="font-family: courier new,courier;">addToChain</span>. The null pointer exception happens here</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p><span style="font-family: courier new,courier;">private void addToChain(PhaseInterceptorChain chain, Message m) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Collection&lt;InterceptorProvider&gt; providers <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = CastUtils.cast((Collection&lt;?&gt;)m.get(Message.INTERCEPTOR_PROVIDERS)); // &lt;= blow up!<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (providers != null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (InterceptorProvider p : providers) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; chain.add(p.getInFaultInterceptors());<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Collection&lt;Interceptor&gt; is = CastUtils.cast((Collection&lt;?&gt;)m.get(Message.FAULT_IN_INTERCEPTORS));<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (is != null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; chain.add(is);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160; }</span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It appears that <span style="font-family: courier new,courier;">m.get(Message.INTERCEPTOR_PROVIDERS)</span> returns <span style="font-family: courier new,courier;">null</span>. I cannot actually find any place in the CXF source where this value is ever put so I don't really know if this is the only thing which is wrong. Anyway, I think the fact that we have now switched to fautl processing rather than delivering an incoming fault message is the root cause of the problem here. I think <span style="font-family: courier new,courier;">createProtocolMessageContext</span> needs to be changed as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><pre jivemacro="quote"><span style="font-family: courier new,courier;">&#160;&#160;&#160; protected MessageContext createProtocolMessageContext(SoapMessage message) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; SOAPMessageContextImpl sm = new SOAPMessageContextImpl(message);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; . . .<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (msg.getSOAPPart().getEnvelope().getBody() != null <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &amp;&amp; msg.getSOAPPart().getEnvelope().getBody().hasFault()<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &amp;&amp; !(isRequestor(msg) &amp;&amp; isInbound())) { // &lt;== allow incoming fault request<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return null;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; } catch (SOAPException e) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; throw new Fault(e);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return sm;<br/>&#160;&#160;&#160; } </span></pre>
</blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Sorry but I'm going to have to raise a Blocker JIRA for this on Jonathan's instructions. It is not possible for the update to CXF to go out in the product if it breaks XTS -- at least not without a decision from on high.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/548969#548969">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services CXF at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2046">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>