14 Replies Latest reply on Nov 30, 2007 9:29 AM by method_ben

    Java Client Application using Stub with WS-Security

    method_ben

      I have some problems to call methods from my web service. I use WS-Security to secure my web service. All necessary files (jboss-wsse-server.xml,jboss-wsse-client.xml, wsse.keystore, wsse.truststore) are in my WAR file.

      My stubs are generated by wsconsume.

      I have made a java application where I put my stub generated stub. This application is not deployed in JBoss. It's a simple java application with a "main".

      Main.java :

      import java.io.File;
      import java.net.MalformedURLException;
      import java.net.URL;
      import javax.naming.NamingException;
      import javax.xml.namespace.QName;
      import org.jboss.ws.core.StubExt;
      import com.client.*;

      public static void main(String[] args) throws MalformedURLException, NamingException
      {

      URL url = new URL("http://localhost:8080/test/Test?wsdl");
      QName qName = new QName("rrr", "TestService");

      TestService service = new TestService(url,qName);
      Test ws = service.getPort(Test.class);

      ((StubExt) ws).setSecurityConfig(new File("etc/jboss-wsse-client.xml").toURI().toURL().toExternalForm());
      ((StubExt) ws).setConfigName("Standard WSSecurity Client");

      ws.hello("Benoit"); // doesnt work !

      }

      When I execute it, I get that :


      Exception in thread "main" javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
      at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
      at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
      at org.jboss.ws.core.jaxws.client.ClientImpl.callRequestHandlerChain(ClientImpl.java:160)
      at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:297)
      at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
      at $Proxy14.hello(Unknown Source)
      at com.main.MainTest.main(MainTest.java:51)
      Caused by: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
      at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
      at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleOutbound(WSSecurityDispatcher.java:314)
      at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleOutboundSecurity(WSSecurityHandler.java:95)
      at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handleOutbound(WSSecurityHandlerClient.java:45)
      at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
      at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
      at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
      ... 7 more

      Anyone knows how I can resolve my problem ?

        • 1. Re: Java Client Application using Stub with WS-Security
          asoldano

          Did you set up the keystore/truststore references in your environment?

           System.setProperty("org.jboss.ws.wsse.keyStore", "resources/interop/nov2007/wsse/shared/META-INF/alice-sign_enc.jks");
           System.setProperty("org.jboss.ws.wsse.trustStore", "resources/interop/nov2007/wsse/shared/META-INF/wsse10.truststore");
           System.setProperty("org.jboss.ws.wsse.keyStorePassword", "password");
           System.setProperty("org.jboss.ws.wsse.trustStorePassword", "password");
           System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
           System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
          




          If you still get errors, please post here your logs with the error details.

          Exception in thread "main" javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
          at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
          at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
          at org.jboss.ws.core.jaxws.client.ClientImpl.callRequestHandlerChain(ClientImpl.java:160)
          at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:297)
          at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
          at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
          at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
          at $Proxy14.hello(Unknown Source)
          at com.main.MainTest.main(MainTest.java:51)
          Caused by: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
          at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
          at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleOutbound(WSSecurityDispatcher.java:314)
          at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleOutboundSecurity(WSSecurityHandler.java:95)
          at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handleOutbound(WSSecurityHandlerClient.java:45)
          at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
          at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
          at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
          ... 7 more

          Anyone knows how I can resolve my problem ?



          • 2. Re: Java Client Application using Stub with WS-Security
            method_ben

            I tried your suggestion :

            package com.main;

            import java.io.File;
            import java.net.MalformedURLException;
            import java.net.URL;
            import javax.naming.NamingException;
            import javax.xml.namespace.QName;
            import javax.xml.rpc.Stub;

            import org.jboss.ws.core.StubExt;
            import com.client.*;



            public class MainTest {

            public static void main(String[] args) throws MalformedURLException, NamingException
            {
            System.setProperty("org.jboss.ws.wsse.keyStore", "etc/wsse.keystore");
            System.setProperty("org.jboss.ws.wsse.trustStore", "etc/wsse.truststore");
            System.setProperty("org.jboss.ws.wsse.keyStorePassword", "mypass");
            System.setProperty("org.jboss.ws.wsse.trustStorePassword", "mypass");
            System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
            System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");

            URL url = new URL("http://127.0.0.1:8080/test/Test?wsdl");
            QName qName = new QName("rrr", "TestService");

            TestService service = new TestService(url,qName);
            Test ws = service.getPort(Test.class);

            ((StubExt) ws).setSecurityConfig(new File("etc/jboss-wsse-client.xml").toURI().toURL().toExternalForm());
            ((StubExt) ws).setConfigName("Standard WSSecurity Client");

            ws.hello("Benoit"); // doesnt work !
            }

            }

            jboss-wwse-client.xml :

            <?xml version="1.0" encoding="UTF-8"?>

            <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.jboss.com/ws-security/config
            http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">










            </jboss-ws-security>

            Generate my keystore and my truststore with this command line :

            keytool -genkey -alias wsse -keyalg RSA -keypass mypass -storepass mypass -keystore c:/wsse.keystore

            keytool -export -alias wsse -storepass mypass -file c:/server.cer -keystore c:/wsse.keystore

            keytool -import -v -trustcacerts -alias wsse -file c:/server.cer -keystore c:/wsse.truststore -keypass mypass -storepass mypass

            and I still get this error :

            Exception in thread "main" javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
            at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
            at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
            at org.jboss.ws.core.jaxws.client.ClientImpl.callRequestHandlerChain(ClientImpl.java:160)
            at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:297)
            at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
            at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
            at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
            at $Proxy14.hello(Unknown Source)
            at com.main.MainTest.main(MainTest.java:35)
            Caused by: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
            at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
            at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleOutbound(WSSecurityDispatcher.java:314)
            at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleOutboundSecurity(WSSecurityHandler.java:95)
            at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handleOutbound(WSSecurityHandlerClient.java:45)
            at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
            at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
            at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
            ... 7 more

            server.log (jboss_folder/server/default/log):

            2007-11-29 09:20:58,342 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
            2007-11-29 09:20:58,342 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
            2007-11-29 09:20:58,451 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
            2007-11-29 09:20:58,451 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
            2007-11-29 09:20:58,545 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
            2007-11-29 09:20:58,545 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1

            My setup :

            jboss-4.2.2.GA
            jbossws-2.0.2.GA
            JDK 6 update 3

            Thank you very much for your help !

            • 3. Re: Java Client Application using Stub with WS-Security
              method_ben

              sorry, I did a bad cut and paste, jboss-wsse-client.xml:

              <?xml version="1.0" encoding="UTF-8"?>

              <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.jboss.com/ws-security/config
              http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">










              </jboss-ws-security>

              • 4. Re: Java Client Application using Stub with WS-Security
                method_ben








                • 5. Re: Java Client Application using Stub with WS-Security
                  method_ben

                  I have some problems to paste my jboss-wsse-client.xml but i use this example :

                  http://wiki.jboss.org/wiki/Wiki.jsp?page=WSSecuritySignEncryptExample

                  • 6. Re: Java Client Application using Stub with WS-Security
                    asoldano

                     

                    "method_ben" wrote:

                    server.log (jboss_folder/server/default/log):

                    2007-11-29 09:20:58,342 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
                    2007-11-29 09:20:58,342 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
                    2007-11-29 09:20:58,451 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
                    2007-11-29 09:20:58,451 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
                    2007-11-29 09:20:58,545 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
                    2007-11-29 09:20:58,545 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1


                    You're supposed to find an exception in your log, since the code you're running is something like
                     try {
                     //some stuff generating the exception
                     }
                     catch (WSSecurityException e)
                     {
                     if (e.isInternalError())
                     log.error("Internal error occured handling outbound message:", e); //this is the interesting log we need
                     else if(log.isDebugEnabled()) log.debug("Returning error to sender: " + e.getMessage());
                    
                     throw convertToFault(e); //this creates the message you get on the client
                     }
                    



                    Please use the preview button before submitting messages on the forum; also wrap code snippets into [ code ] [ /code ] tags.


                    • 7. Re: Java Client Application using Stub with WS-Security
                      method_ben

                      I did not find an exception in my server log file and my code (web service)doesnt contain an try/catch(WSSecurityException e) clause like you said.

                      I think that the exception is thrown by a referenced lib. In my classpath of my Eclipse projects (my client project and my web service project), I include all libs of jboss_folder/client and jboss_folder/lib/endorsed.

                      My web service class :

                      import javax.jws.WebMethod;
                      import javax.jws.WebParam;
                      import javax.jws.WebResult;
                      import javax.jws.WebService;
                      import javax.jws.soap.SOAPBinding;
                      import org.jboss.ws.annotation.EndpointConfig;
                      
                      @WebService(targetNamespace = "rrr",serviceName = "TestService", wsdlLocation="WEB-INF/wsdl/TestService.wsdl")
                      @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED, use=SOAPBinding.Use.LITERAL, style=SOAPBinding.Style.DOCUMENT)
                      @EndpointConfig(configName = "Standard WSSecurity Endpoint")
                      public class Test
                      {
                       @WebMethod
                       @WebResult(name="result",targetNamespace="rrr")
                       public String allo(@WebParam(name="name", targetNamespace="rrr")String name)
                       {
                       System.out.println("Allo " + name);
                       return name;
                       }
                      
                       @WebMethod
                       @WebResult(name="result",targetNamespace="rrr")
                       public String hello(@WebParam(name="name", targetNamespace="rrr")String name)
                       {
                       System.out.println("Hello " + name);
                       return name;
                       }
                      }
                      


                      Contains of my war file :

                      META-INF\MANIFEST.MF
                      WEB-INF\jboss-wsse-client.xml
                      WEB-INF\jboss-wsse-server.xml
                      WEB-INF\web.xml
                      WEB-INF\wsse.keystore
                      WEB-INF\wsse.truststore
                      WEB-INF\classes\com\Test.Class
                      WEB-INF\wsdl\TestService.wsdl

                      I have no idea where the exception is logged !

                      • 8. Re: Java Client Application using Stub with WS-Security
                        method_ben

                        I think that the server never receive the web method call !

                        • 9. Re: Java Client Application using Stub with WS-Security
                          asoldano

                           

                          "method_ben" wrote:
                          I did not find an exception in my server log file and my code (web service)doesnt contain an try/catch(WSSecurityException e) clause like you said.

                          Of course, the code I wrote is a snippet from the JBossWS stack just before your exception is created...

                          I have no idea where the exception is logged !

                          It should be in the server logs, try checking your jboss-log4j conf to ensure everything from the org.jboss.ws category is shown in the server.log

                          • 10. Re: Java Client Application using Stub with WS-Security
                            method_ben

                            I enabled JBossWS message tracing in jboss-log4j.xml :

                             <!-- Enable JBossWS message tracing-->
                             <category name="org.jboss.ws.core">
                             <priority value="DEBUG"/>
                             </category>
                            


                            I restarted my server and I still get no log in my server log file !

                            • 11. Re: Java Client Application using Stub with WS-Security
                              asoldano

                               

                              "method_ben" wrote:
                              I enabled JBossWS message tracing in jboss-log4j.xml :

                               <!-- Enable JBossWS message tracing-->
                               <category name="org.jboss.ws.core">
                               <priority value="DEBUG"/>
                               </category>
                              


                              I restarted my server and I still get no log in my server log file !


                              I said org.jboss.ws not org.jboss.ws.core ;-) The class your trying to get logs from is org.jboss.ws.extensions.security.WSSecurityDispatcher

                              • 12. Re: Java Client Application using Stub with WS-Security
                                method_ben

                                I tried with org.jboss.ws and I still get no log...

                                As I said, I think that the problem is at client side and not at the server side.

                                It is possible that the problem comes from the generated stub client which are generated with wsconsume ?

                                On the other hand, I tried to set a wrong path for my keystore with the System.setproperty command and I still get the same error !?

                                • 13. Re: Java Client Application using Stub with WS-Security
                                  asoldano

                                   

                                  "method_ben" wrote:
                                  I tried with org.jboss.ws and I still get no log...

                                  As I said, I think that the problem is at client side and not at the server side.

                                  It is possible that the problem comes from the generated stub client which are generated with wsconsume ?

                                  On the other hand, I tried to set a wrong path for my keystore with the System.setproperty command and I still get the same error !?


                                  The jbossws code I wrote above is executed both on client and server side. If your not comfortable with the logs, try capturing the network trafic to understand whether a soap message actually goes to the wire. Then search again in the logs on the right side. Beware of the log4j conf on the client side too.

                                  • 14. Re: Java Client Application using Stub with WS-Security
                                    method_ben

                                    Ok, I enabled the log on the client and I turned on the debug option. Finally, I found my error. My target namespace ("rrrr") is the cause of my problem.

                                    I changed my namespace to another pattern like "urn:com:test" and everything works now.

                                    But, when I remove the VM argument :

                                    -Dlog4j.configuration=file:log4j.properties

                                    ... I get an error. Client side :

                                    
                                    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
                                     at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:72)
                                     at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
                                     at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
                                     at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
                                     at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
                                     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
                                     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
                                     at $Proxy14.hello(Unknown Source)
                                     at com.main.MainTest.main(MainTest.java:34)
                                    


                                    server side :

                                    
                                    2007-11-30 09:27:08,733 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
                                    2007-11-30 09:27:08,733 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
                                    2007-11-30 09:27:08,858 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
                                    2007-11-30 09:27:08,858 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
                                    2007-11-30 09:27:08,952 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
                                    2007-11-30 09:27:08,952 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
                                    2007-11-30 09:27:11,233 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] doPost: /test/Test
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleRequest: jboss.ws:context=test,endpoint=Test
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@1b99628 (Thread http-127.0.0.1-8080-1)
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] BEGIN handleRequest: jboss.ws:context=test,endpoint=Test
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl] createMessage: [contentType=text/xml; charset=UTF-8]
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callRequestHandlerChain: POST
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] getHandlerChain: [type=POST,info=[service={urn:com:myca:si}TestService,port={urn:com:myca:si}TestPort,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Create a handler executor: [WSSecurity Handler]
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleIn BoundMessage
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/servers/jboss-4.2.2.GA/server/default/tmp/deploy/tmp5956test-exp.war/WEB-INF/wsse.keystore
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/servers/jboss-4.2.2.GA/server/default/tmp/deploy/tmp5956test-exp.war/WEB-INF/wsse.truststore
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
                                    2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
                                    2007-11-30 09:27:11,280 WARN [org.apache.xml.security.signature.Reference] Verification failed for URI "#element-1-1196432830499-23083996"
                                    2007-11-30 09:27:11,280 INFO [org.apache.xml.security.signature.Reference] Verification successful for URI "#timestamp"
                                    2007-11-30 09:27:11,280 ERROR [org.jboss.ws.extensions.security.WSSecurityDispatcher] Internal error occured handling inbound message:
                                    org.jboss.ws.extensions.security.FailedCheckException: Signature is invalid.
                                     at org.jboss.ws.extensions.security.SignatureVerificationOperation.process(SignatureVerificationOperation.java:59)
                                     at org.jboss.ws.extensions.security.SecurityDecoder.decode(SecurityDecoder.java:123)
                                     at org.jboss.ws.extensions.security.SecurityDecoder.decode(SecurityDecoder.java:185)
                                     at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:147)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
                                     at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
                                     at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
                                     at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
                                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                                     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:230)
                                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                                     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                                     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                                     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:157)
                                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                                     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                                     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                                     at java.lang.Thread.run(Thread.java:619)
                                    2007-11-30 09:27:11,280 ERROR [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exception during handler processing
                                    org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
                                     at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
                                     at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:177)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
                                     at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
                                     at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
                                     at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
                                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                                     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:230)
                                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                                     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                                     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                                     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:157)
                                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                                     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                                     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                                     at java.lang.Thread.run(Thread.java:619)
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleIn BoundMessage with status: false
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.MessageContextJAXWS] Begin response processing
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@1b99628 (Thread http-127.0.0.1-8080-1)
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@9042c8 (Thread http-127.0.0.1-8080-1)
                                    2007-11-30 09:27:11,280 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
                                    javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
                                     at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
                                     at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
                                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                                     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:230)
                                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                                     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                                     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                                     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:157)
                                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                                     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                                     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                                     at java.lang.Thread.run(Thread.java:619)
                                    Caused by: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
                                     at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
                                     at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:177)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
                                     at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
                                     ... 27 more
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] Cannot obtain fault meta data for: class javax.xml.ws.WebServiceException
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: PRE
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: ENDPOINT
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: POST
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleOutBoundFault
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleOutBoundFault with status: true
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] close
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure SOAPBinding
                                    2007-11-30 09:27:11,280 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
                                    javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
                                     at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
                                     at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
                                     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
                                     at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
                                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                                     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:230)
                                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                                     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                                     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                                     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:157)
                                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                                     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                                     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                                     at java.lang.Thread.run(Thread.java:619)
                                    Caused by: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
                                     at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
                                     at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:177)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
                                     at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
                                     at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
                                     at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
                                     ... 27 more
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] Cannot obtain fault meta data for: class javax.xml.ws.WebServiceException
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] END handleRequest: jboss.ws:context=test,endpoint=Test
                                    2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@9042c8 (Thread http-127.0.0.1-8080-1)
                                    2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Fri, 30 Nov 2007 09:27:33>
                                    2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
                                    2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
                                    2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
                                    
                                    


                                    Why it doesnt recognize my signature when I remove my VM argument ?