It's caused by a bug in WSS4J that I've just fixed. In the meantime, you
can just create a new empty Document + pass that instead to toDOM().

Colm.

On Wed, Jun 17, 2015 at 2:48 PM, <stephen.ctr.chapp...@faa.gov> wrote:

> In migrating some code up to WSS4J 2.1 (from 1.6.17), I'm getting an
> unexpected NullPointerException where I previously did not. When calling
> this:
>
> Node content = sa.toDOM(null); // sa is a SamlAssertionWrapper
>
> I get this:
>
> Caused by: java.lang.NullPointerException
>                 at
> org.opensaml.core.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:74)
>                 at
> org.apache.wss4j.common.saml.OpenSAMLUtil.toDom(OpenSAMLUtil.java:170)
>                 at
> org.apache.wss4j.common.saml.OpenSAMLUtil.toDom(OpenSAMLUtil.java:142)
>                 at
> org.apache.wss4j.common.saml.SamlAssertionWrapper.toDOM(SamlAssertionWrapper.java:271)
>
> In previous versions, I'd have issues when I'd forget to call
> OpenSAMLUtil.initSamlEngine(), but I am definitely doing that now during
> startup. Adding an InitializationService.initialize(); from OpenSAML 3
> doesn't change anything. Is there some additional initialization that is
> needed that I am missing?
>
> Thanx,
>
> Stephen W. Chappell
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to