1 Reply Latest reply on Feb 9, 2007 8:37 AM by bertaa

    WS-Security internal error when signing

    bertaa

      Operating system : Windows XP
      Java version: 1.4.2_08
      JBoss Sever version : jboss-4.0.5.GA

      Hello,

      I am trying to develop a ws-client, but when I try to test it I get the following error

      java.rmi.RemoteException: Call invocation failed with code [InternalError] because of: An internal WS-Security error occurred. See log for details; nested exception is:
       javax.xml.rpc.soap.SOAPFaultException: An internal WS-Security error occurred. See log for details
       at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:713)
       at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
       at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
       at $Proxy2.wS_LPROCS(Unknown Source)
       at org.tempuri.Prueba.test7WS_PROCSoapWS_LPROCS(Prueba.java:62)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      Caused by: javax.xml.rpc.soap.SOAPFaultException: An internal WS-Security error occurred. See log for details
       at org.jboss.ws.wsse.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:103)
       at org.jboss.ws.wsse.WSSecurityDispatcher.handleOutbound(WSSecurityDispatcher.java:304)
       at org.jboss.ws.wsse.WSSecurityHandler.handleOutboundSecurity(WSSecurityHandler.java:97)
       at org.jboss.ws.wsse.WSSecurityHandlerOutbound.handleRequest(WSSecurityHandlerOutbound.java:38)
       at org.jboss.ws.handler.HandlerWrapper.handleRequest(HandlerWrapper.java:121)
       at org.jboss.ws.handler.HandlerChainBaseImpl.handleRequest(HandlerChainBaseImpl.java:245)
       at org.jboss.ws.jaxrpc.CallImpl.callRequestHandlerChain(CallImpl.java:747)
       at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:650)
       ... 17 more
      
      


      I have already checked I have bouncycastle installed in my jre.

      Can anybody help me to solve it, or at least how to get a more detailed trace?

      these are my artifacts:
      
      <application-client xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd" version="1.4">
      <service-ref>
       <display-name>WS_PROC</display-name>
       <service-ref-name>service/WS_PROC</service-ref-name>
       <service-interface>javax.xml.rpc.Service</service-interface>
       <wsdl-file>WEB-INF/wsdl/WS_PROC.wsdl</wsdl-file>
       <jaxrpc-mapping-file>
       WEB-INF/jaxrpc-mapping.xml
       </jaxrpc-mapping-file>
       <port-component-ref>
       <service-endpoint-interface>
       org.tempuri.WS_PROCSoap
       </service-endpoint-interface>
       </port-component-ref>
      </service-ref>
      </application-client>
      
      <jboss-client>
      <jndi-name>WS_PROC</jndi-name>
      <service-ref>
      <service-ref-name>service/WS_PROC</service-ref-name>
      <config-name>Standard Secure Client</config-name>
      </service-ref>
      </jboss-client>
      

      <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">
       <key-store-file>c:/keystore/jbossws.jks</key-store-file>
       <key-store-password>jbossws</key-store-password>
       <trust-store-file>C:/keystore/jbossws.truststore</trust-store-file>
       <trust-store-password>jbossws</trust-store-password>
      <config>
       <sign type="x509v3" alias="wsse"/>
       <requires>
       <signature/>
       </requires>
       </config>
      </jboss-ws-security>


      And this is the code to test it
      public void testWS_PROCSoapWS_LPROCS() throws Exception {
       Context ctx = this.getInitialContext();
       Service service = (Service)ctx.lookup("java:comp/env/service/WS_PROC");
       WS_PROCSoap port=(WS_PROCSoap)service.getPort(WS_PROCSoap.class);
       WS_LPROCSResponse procedimientos=port.wS_LPROCS(new WS_LPROCS("PRUEBA"));
       assertNotNull(procedimientos);
      }
      


      Thanks in advance for your help