Colm - that appears to have done the trick, thanx!
Stephen W. Chappell
-Original Message-
From: Colm O hEigeartaigh [mailto:cohei...@apache.org]
Sent: Thursday, June 18, 2015 6:42 AM
To: us...@cxf.apache.org
Cc: users@ws.apache.org
Subject: Re: NPE when calling SamlAssertionWrapper.toDOM(null)
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, 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(SamlAssertionW
> rapper.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