Not exactly sure what would cause this. The NPE is from the XMLStreamReader being null. The only way I can really see this happening is if the incoming message from the servlet isn't marked as XML or similar. Can you wireshark this or similar to make sure the Content-Type is properly set? Maybe debug into the StaxInInterceptor to see why it may not be creating the XMLStreamReader?
Dan On Wednesday 03 November 2010 10:43:05 am viveksvl wrote: > Hi All, > I am trying a simple example to get Authentication working in webshere > application sever 7.0. > Below are the steps that I've taken. > 1)Put this line in manifest file =DisableIBMJAXWSEngine: true > 2)Using CXF 2.3.0 version. > 3)Class loader to load the app jars first = Pick up jaxp-ri-1.4.2 and > saaj-impl-1.3.2 > 4)Here is the content of service context file > <bean id="myPasswordCallback" > class="com.svl.myexample.outbound.ServerPasswordCallback" /> > <jaxws:endpoint id="library" > implementor="com.svl.myexample.outbound.LibraryImpl" > wsdlLocation="WEB-INF/wsdl/library.wsdl" > address="/cxf-library"> > > <jaxws:inInterceptors> > <bean > class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"> > <constructor-arg> > <map> > <entry key="action" value="UsernameToken"/> > <entry key="passwordType" value="PasswordText"/> > <entry key="passwordCallbackRef"> > <ref bean="myPasswordCallback"/> > </entry> > </map> > </constructor-arg> > </bean> > </jaxws:inInterceptors> > </jaxws:endpoint> > 5)Example Link = http://cxf.apache.org/docs/ws-security.html > 6)WSDL reflects per = > http://www.ibm.com/developerworks/java/library/j-jws13.html?ca=drs- > Exception= > [11/2/10 16:47:24:867 EDT] 00000030 PhaseIntercep W > org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging Interceptor for > {http://ws.sosnoski.com/library/wsdl}CXFLibrary has thrown exception, > unwinding now > java.lang.NullPointerException > at > org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:961) > at > org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:949) > at > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInte > rceptor.java:185) at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getSOAPMessage(WSS4JInI > nterceptor.java:127) at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn > terceptor.java:161) at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn > terceptor.java:78) at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.java:247) at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO > bserver.java:113) at > org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestinati > on.java:97) at > org.apache.cxf.transport.servlet.ServletController.invokeDestination(Servle > tController.java:458) at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController > .java:146) at > org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServl > et.java:148) at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Abstract > HTTPServlet.java:179) at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServ > let.java:108) at > javax.servlet.http.HttpServlet.service(HttpServlet.java:718) > at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPSe > rvlet.java:159) at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java: > 1449) at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper > .java:790) at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper > .java:443) at > com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWra > pperImpl.java:175) at > com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610) at > com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274) > at > com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926) > at > com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:15 > 57) at > com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(H > ttpInboundLink.java:455) at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(H > ttpInboundLink.java:384) at > com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLRe > adCallback.java:83) at > com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioRe > adCompletionListener.java:165) at > com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.jav > a:217) at > com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFutur > e.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) > at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202) > at > com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:76 > 6) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896) > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527) > > Thanks in advance, > Vivek. -- Daniel Kulp [email protected] http://dankulp.com/blog
