当前位置:编程学习 > JAVA >>

求助!!有关wsdl导入java的客户端访问服务端的问题

一个java工程导入wsdl自动生成对应的客户端,然后我再里面调用这个客户端的方法,也传入了相应的参数,用junit测试出问题了!!!
org.apache.axis2.AxisFault: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: Cannot encrypt data; nested exception is: 
org.apache.xml.security.c14n.CanonicalizationException: Element ns5:AccountQuery has a relative namespace: ns5="ocs/server"
at org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:67)
at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72)
at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at server.ocs.UvcSoapForOcsServiceStub.AccountQuery(UvcSoapForOcsServiceStub.java:838)
at server.ocs.UvcSoapForOcsServiceStubTest.testAOCQuery(UvcSoapForOcsServiceStubTest.java:54)
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:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: Cannot encrypt data; nested exception is: 
org.apache.xml.security.c14n.CanonicalizationException: Element ns5:AccountQuery has a relative namespace: ns5="ocs/server"
at org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:65)
at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:197)
at org.apache.rampart.handler.WSDoAllSender.processBasic(WSDoAllSender.java:201)
at org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:64)
... 33 more
求大神支招!!!!! wsdl 客户端 服务端 Java --------------------编程问答-------------------- 俺们用的是axis工具处理wsdl生成的代码,别的方法没试过。。 --------------------编程问答-------------------- 我这边也是有用axis工具处理,但是还需要用我上面说的方法测试...可是测试不通啊.... --------------------编程问答-------------------- 有没有人帮忙啊.....
补充:Java ,  Java SE
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,