1

使用 CXF-STS 我遇到了异常<<||2014-07-14 21:51:14,125||http-apr-8080-exec-8|DEBUG|org.apache.ws.security.processor.Signat‌​ureProcessor:428||||>> XML Signature verification has failed <<||2014-07-14 21:51:14,127||http-apr-8080-exec-8|DEBUG|org.apache.ws.security.processor.Signat‌​ureProcessor:431||||>> Signature Validation check: false

如帖子所述,CXF STS Usernametoken 对称绑定 XML 签名验证失败 https://issues.apache.org/jira/browse/CXF-5679 https://issues.apache.org/jira/browse/CXF-5679 所以假设它已针对 3.0.0 版本修复,我移至它。现在在启动时我面临的错误是

... 25 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:176)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
    at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
    ... 34 more
Caused by: org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/http.
    at org.apache.cxf.bus.managers.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:122)
    at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:88)
    at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:72)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)

我无法弄清楚如何才能真正使用 CXF STS 示例。请提供一些很好的示例参考,以在 UsernameToken with Encryption Scenario 中使用 CXF STS

谢谢

4

1 回答 1

0

这是因为我的项目有 CAMEL-CXF 依赖项,其中包含嵌入的 CXF 2.7。它可能与新的 CXF 3.0.0 版本产生了冲突。所以从类路径中删除它们解决了问题

谢谢

于 2014-07-16T11:15:53.850 回答