2 Replies Latest reply: Mar 20, 2009 7:11 AM by Richard Opalka RSS

CXF One Way Messages using WSRM

Bryan Kearney Newbie

Please see this post on the cxf users list:

http://www.nabble.com/Reliable-One-Way-Messages-td22604819.html

I am attempting to use a WSRM client to send a oneway message. before getting the erorr in that message I actually got this exception in the jboss stack:

09:23:23,581 ERROR [STDERR] java.lang.NullPointerException
09:23:23,582 ERROR [STDERR] at org.jboss.wsf.stack.cxf.AbstractInvoker.updateWebServiceContext(AbstractInvoker.java:241)
09:23:23,583 ERROR [STDERR] at org.jboss.wsf.stack.cxf.AbstractInvoker.invoke(AbstractInvoker.java:106)
09:23:23,583 ERROR [STDERR] at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)
09:23:23,583 ERROR [STDERR] at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
09:23:23,584 ERROR [STDERR] at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92)
09:23:23,584 ERROR [STDERR] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:226)
09:23:23,584 ERROR [STDERR] at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)
09:23:23,585 ERROR [STDERR] at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
09:23:23,585 ERROR [STDERR] at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:305)
09:23:23,585 ERROR [STDERR] at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:160)
09:23:23,586 ERROR [STDERR] at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:61)
09:23:23,586 ERROR [STDERR] at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:134)
09:23:23,588 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
09:23:23,588 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
09:23:23,588 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:23:23,588 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
09:23:23,588 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
09:23:23,588 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:23:23,588 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
09:23:23,588 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
09:23:23,588 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
09:23:23,588 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
09:23:23,588 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
09:23:23,588 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
09:23:23,588 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
09:23:23,589 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
09:23:23,589 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
09:23:23,589 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
09:23:23,589 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
09:23:23,589 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
09:23:23,589 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
09:23:23,589 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
09:23:23,589 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)



To git around this I had to patch org.jboss.wsf.stack.cxf.AbstractInvoker with this:

< if (sm != null) {
< Iterator<?> iter = list.iterator();
< while (iter.hasNext())
< {
< sm.getHeaders().add((Header) iter.next());
< }
---
> Iterator<?> iter = list.iterator();
> while (iter.hasNext())
> {
> sm.getHeaders().add((Header) iter.next());