我从 WSO2 身份服务器 STS 客户端调用中的以下方法调用中收到错误,
电话:
responseToken = stsClient.requestSecurityToken(servicePolicy,
STS_EPR, stsPolicy, RELYING_PARTY_SERVICE_EPR);
返回以下错误。
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.init()V
at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:311)
at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:327)
at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:336)
at org.apache.ws.security.WSSConfig.getDefaultWSConfig(WSSConfig.java:345)
at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:363)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:398)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:554)
at org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:164)
at org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:181)
这显然是类路径中包含的错误 jar。我正在针对 WSO2 身份服务器 4.1.0 运行此程序,并且违反 wss4j .jar 版本是 4.1.0 IS 附带的 wss4j_1.5.11.wso2v5.jar。我应该使用哪个版本的 .jar 来解决这个问题?
旁注:我在 WSO2 的公共 Maven 存储库中查找了源 .jar 文件,但那里只有二进制 .jar 文件可用,为什么 WSO2 公共存储库中缺少源 .jar 文件,因为 WSO2 相信开源软件?
这里我特指http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/ws/security/wss4j/1.5.11-wso2v5/