Opensaml error receiving correct unmarshaller

前端 未结 2 1504
小鲜肉
小鲜肉 2020-12-11 03:54

I am running this code at opensaml2.6

Element metadataRoot = document.getDocumentElement();

// Unmarshall
UnmarshallerFactory unmarshallerFactory = Configur         


        
相关标签:
2条回答
  • 2020-12-11 04:12

    In OpenSAML3 you have to first make sure to include the opensaml-saml-impl artifact in your dependencies, since all the marshallers and unmarshallers are implemented there.

    Then, as @Goblins and @Pegerto pointed out, you have to call InitializationService.initialize(). I have found this link to be useful for doing a correct initialization when using Dependency Injection https://github.com/apereo/cas/blob/master/support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/OpenSamlConfigBean.java

    0 讨论(0)
  • 2020-12-11 04:23

    I found that there is not unmarshallers register as there is not initialization in the library:

    Important piece of code:

    // Initialize the library
    DefaultBootstrap.bootstrap();
    
    0 讨论(0)
提交回复
热议问题