XTS tests broken in AS trunk after switch to CXF stack in 3.3.0
adinn Jun 7, 2010 8:41 AMThe XTS test suite is severely broke in the latest AS trunk. There appear to be many failures although it is likely that these are all caused by some initial problem.
The problem manifests in the WS-C tests. Each of these tests attempts to communicate with the Activation Coordinator service using an RPC style message. The message gets through and is processed but then a problem occurs in the interceptor chain when processing the response. This results in a fault being returned to the client causing the test to abort.
The problem occurs under the MAPAggregator interceptor: Here is the stack trace on the server side:
10:55:27,901 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] Interceptor for {http://docs.oasis-open.org/ws-tx/wscoor/2006/06}ActivationService#{http://docs.oasis-open.org/ws-tx/wscoor/2006/06}CreateCoordinationContextOperation has thrown exception, unwinding now: java.lang.NullPointerException
at org.apache.cxf.ws.addressing.ContextUtils.getAction(ContextUtils.java:826) [:2.2.8]
at org.apache.cxf.ws.addressing.ContextUtils.getActionFromMessageAttributes(ContextUtils.java:804) [:2.2.8]
at org.apache.cxf.ws.addressing.ContextUtils.getActionFromServiceModel(ContextUtils.java:740) [:2.2.8]
at org.apache.cxf.ws.addressing.ContextUtils.getAction(ContextUtils.java:711) [:2.2.8]
at org.apache.cxf.ws.addressing.MAPAggregator.assembleGeneric(MAPAggregator.java:425) [:2.2.8]
at org.apache.cxf.ws.addressing.MAPAggregator.aggregate(MAPAggregator.java:398) [:2.2.8]
at org.apache.cxf.ws.addressing.MAPAggregator.mediate(MAPAggregator.java:344) [:2.2.8]
at org.apache.cxf.ws.addressing.MAPAggregator.handleMessage(MAPAggregator.java:159) [:2.2.8]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243) [:2.2.8]
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:78) [:2.2.8]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243) [:2.2.8]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110) [:2.2.8]
at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98) [:2.2.8]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423) [:2.2.8]
at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:175) [:3.3.0.GA]
at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:57) [:3.3.0.GA]
at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:126) [:3.3.0.GA]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) [:2.2.8]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) [:2.2.8]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [:1.0.0.Beta2]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) [:2.2.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:336) [:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293) [:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0-SNAPSHOT]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR2]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR2]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0-SNAPSHOT]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:93) [:6.0.0-SNAPSHOT]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0-SNAPSHOT]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0-SNAPSHOT]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:876) [:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_14]
The method which is failing is
public static String getAction(Extensible ext) {
Object o = ext.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
if (o == null) {
o = ext.getExtensionAttributes().get(new QName(Names.WSA_NAMESPACE_WSDL_METADATA,
Names.WSAW_ACTION_NAME));
}
if (o == null) {
o = ext.getExtensionAttributes().get(new QName(Names.WSA_NAMESPACE_WSDL_NAME_OLD,
Names.WSAW_ACTION_NAME));
}
if (o instanceof QName) {
return ((QName)o).getLocalPart();
}
return o.toString(); // <=== fails here
}
This looks weird to me. The ext object has an action value as follows
ext
- extensionAttributes {java.util..HashMap} size = 1
- [0]
- key = javax.xml.namespace.QName {http://www.w3.org/2005/08/addressing}Action
- value = javax.xml.namespace.QName http://docs.oasis-open.org/ws-tx/wscoor/2006/06/CreateCoordinationContextResponse
The code is not looking for this property though. The properties it is using in the lookup are
JAXWSAConstants.WSAW_ACTION_QNAME
==> {http://www.w3.org/2006/05/addressing/wsdl}Action
new QName(Names.WSA_NAMESPACE_WSDL_METADATA, Names.WSAW_ACTION_NAME)==> "http://www.w3.org/2007/05/addressing/metadata}Action
new QName(Names.WSA_NAMESPACE_WSDL_NAME_OLD, Names.WSAW_ACTION_NAME)
==> {http://www.w3.org/2005/02/addressing/wsdl}Action
This seems whacko to me. Why is the lookup not using {http://www.w3.org/2005/08/addressing/wsdl}Action?