[jboss-user] [JBossWS] - jbossws-samples-1.0.4.GA ws-security sign - Unprocessed 'mus

redcat63 do-not-reply at jboss.com
Fri Feb 9 12:47:46 EST 2007


I have been trying to get webservices security to work for a couple of days but cant solve a bug.  I have now run the jbossws-samples-1.0.4.GA and get the same issue.  The issue is that the server can't process the signature and gives the following error:

2007-02-09 17:06:50,732 ERROR [org.jboss.ws.common.CommonClient:329] Call invocation failed
  | javax.xml.rpc.soap.SOAPFaultException: Unprocessed 'mustUnderstand' header element: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security
  | 	at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.getSOAPFaultException(SOAPFaultExceptionHelper.java:100)
  | 	at org.jboss.ws.common.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:574)
  | 	at org.jboss.ws.common.CommonClient.invoke(CommonClient.java:319)
  | 	at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:560)
  | 	at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:338)
  | 	at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
  | 	at $Proxy0.echoUserType(Unknown Source)
  | 	at org.jboss.test.ws.jaxrpc.samples.wssecurity.SimpleSignTestCase.testEndpoint(SimpleSignTestCase.java:69)
  | 	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 junit.framework.TestSuite.runTest(TestSuite.java:208)
  | 	at junit.framework.TestSuite.run(TestSuite.java:203)
  | 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
  | 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.extensions.TestSetup.run(TestSetup.java:23)
  | 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
  | 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
  | 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)

I am running jboss-4.0.4.GA, the server side output is:

  | 2007-02-09 17:06:50,669 DEBUG [javax.xml.rpc.soap.SOAPFaultException] new SOAPFaultException [code={http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand,string=Unprocessed 'mustUnderstand' header element: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security,actor=null,detail=null]
  | 2007-02-09 17:06:50,669 ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
  | javax.xml.rpc.soap.SOAPFaultException: Unprocessed 'mustUnderstand' header element: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security
  | 	at org.jboss.ws.handler.HandlerChainBaseImpl.checkMustUnderstand(HandlerChainBaseImpl.java:510)
  | 	at org.jboss.ws.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:215)
  | 	at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:104)
  | 	at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:234)
  | 	at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:120)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | 	at java.lang.Thread.run(Thread.java:595)
The only changes I have made to the samples are that I have commented out the deploy and undeploy code in the JBossTestDeployer class as I was geting another error when deploying, so I copy the files across manually.  I have made the test class SimpleSignTestCase I have forced it to set up the port without using contexts (as this was giving a classcastexception). I have also commented out all of the other tests in ant.
If someone can tell me what is going wrong it would be good as I can then get my code working that has the same problem.  If anyone can tell me why I get the classcastexception when I use jndi with the sign example but not witht the encrypt example that would be greate. Exception:

2007-02-09 17:45:16,867 ERROR [org.jboss.ws.jaxrpc.ServiceObjectFactory:269] Cannot create service
  | java.lang.ClassCastException: org.jboss.webservice.metadata.serviceref.ServiceRefMetaData
  | 	at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:122)
  | 	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
  | 	at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
  | 	at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
  | 	at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
  | 	at $Proxy0.lookup(Unknown Source)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:351)
  | 	at org.jboss.test.ws.jaxrpc.samples.wssecurity.SimpleSignTestCase.getPort(SimpleSignTestCase.java:78)
  | 	at org.jboss.test.ws.jaxrpc.samples.wssecurity.SimpleSignTestCase.testEndpoint(SimpleSignTestCase.java:66)
  | 	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 junit.framework.TestSuite.runTest(TestSuite.java:208)
  | 	at junit.framework.TestSuite.run(TestSuite.java:203)
  | 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
  | 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.extensions.TestSetup.run(TestSetup.java:23)
  | 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
  | 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
  | 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013783#4013783

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013783



More information about the jboss-user mailing list