1 Reply Latest reply on Jul 7, 2011 7:08 AM by Alessio Soldano

    algorithm does not exist - cxf-3.4.0.GA, jboss-5.1.0.GA

    Vladimir Smirnov Newbie

      Hi!

      I install cxf-3.4.0.GA with Spring on jboss-5.1.0.GA, create web service and configure them in jbossws-cxf.xml. When i try send to this web service signed SOAP message, i getting the error:

       

      16:15:28,234 WARN  [PhaseInterceptorChain] Interceptor for {http://webservicetest.request.engine.universal.com.interactive.plugins.nat/}UniversalServiceTestService has thrown exception, unwinding now

      org.apache.cxf.binding.soap.SoapFault: The signature or decryption was invalid; nested exception is:

          org.apache.xml.security.signature.XMLSignatureException: The requested algorithm http://www.w3.org/2000/09/xmldsig#rsa-sha1 does not exist. Original Message was: null

      Original Exception was java.lang.NullPointerException

          at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.createSoapFault(WSS4JInInterceptor.java:654)

          at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:275)

          at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:81)

          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)

          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)

          at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97)

          at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461)

          at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:172)

          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:57)

          at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:162)

          at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:90)

          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)

          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

          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)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

          at java.lang.Thread.run(Thread.java:619)

      Caused by: org.apache.ws.security.WSSecurityException: The signature or decryption was invalid; nested exception is:

          org.apache.xml.security.signature.XMLSignatureException: The requested algorithm http://www.w3.org/2000/09/xmldsig#rsa-sha1 does not exist. Original Message was: null

      Original Exception was java.lang.NullPointerException

          at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:627)

          at org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:114)

          at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:328)

          at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245)

          at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:215)

          ... 33 more

      Caused by: org.apache.xml.security.signature.XMLSignatureException: The requested algorithm http://www.w3.org/2000/09/xmldsig#rsa-sha1 does not exist. Original Message was: null

      Original Exception was java.lang.NullPointerException

          at org.apache.xml.security.algorithms.SignatureAlgorithm.buildSigner(Unknown Source)

          at org.apache.xml.security.algorithms.SignatureAlgorithm.getInstanceForVerify(Unknown Source)

          at org.apache.xml.security.algorithms.SignatureAlgorithm.initializeAlgorithm(Unknown Source)

          at org.apache.xml.security.algorithms.SignatureAlgorithm.initVerify(Unknown Source)

          at org.apache.xml.security.signature.XMLSignature.checkSignatureValue(Unknown Source)

          at org.apache.xml.security.signature.XMLSignature.checkSignatureValue(Unknown Source)

          at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:470)

          ... 37 more

       

      In debug mode, i call this code on server VM:

      org.apache.xml.security.algorithms.SignatureAlgorithm.getImplementingClass("http://www.w3.org/2000/09/xmldsig#rsa-sha1")

      that return me implementation class without exceptions.

       

      Can someone please tell me in which direction to look for resolve that problem?