您好,我目前正在将应用程序移植到 opensaml3 并遇到以下问题:
InitializationService.initialize();
...
Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(qName);
我已经用初始化函数替换了 opensaml2 和之前的 DefaultBootstrap。工厂仍然将我作为编码器返回 null。 知道这里出了什么问题吗?
这是初始化进度的输出:
[main] INFO org.opensaml.core.config.InitializationService - Initializing OpenSAML using the Java Services API
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmlenc#ripemd160
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160
最佳答案
我想您使用的是 opensaml v3 所以你应该像这样用 XMLObjectProviderRegistrySupport 类创建 UnmarshallerFactory 对象,它工作得很好
UnmarshallerFactory umFactory=XMLObjectProviderRegistrySupport.getUnmarshallerFactory();
Unmarshaller unmarshaller=umFactory.getUnmarshaller(element);
关于java - OpenSAML 3 解码器为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40508448/