Skip to Content.
Sympa Menu

mace-opensaml-users - DOM Element node adoption failed

Subject: OpenSAML user discussion

List archive

DOM Element node adoption failed


Chronological Thread 
  • From: "" <>
  • To:
  • Subject: DOM Element node adoption failed
  • Date: Sat, 24 Apr 2010 15:41:48 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=BLHxXbHAHf3K7rt924fCYpQ48rxnSWMbbNlvG6ih8UNeMDHgSFucnAIzoltaUrgwkt kghf5o7rqnGXM+Xm20AI4QU53S7/19Zwj5QP84nUvFV1iPjWLV/kBEEMvENyBDlVKG0H mFvXD6IAS1tZtQaFRJTHO1O6T1PfzaEqx92vM=

Hi All,

with this new version (2.3.1) I've a lot of these problems:

15:38:55,211 ERROR [STDERR] org.opensaml.xml.XMLRuntimeException: DOM
Element node adoption failed
15:38:55,211 ERROR [STDERR] at
org.opensaml.xml.util.XMLHelper.adoptElement(XMLHelper.java:482)
15:38:55,211 ERROR [STDERR] at
org.opensaml.xml.util.XMLHelper.appendChildElement(XMLHelper.java:467)
15:38:55,211 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:161)
15:38:55,212 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshallChildElements(AbstractXMLObjectMarshaller.java:316)
15:38:55,212 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshallInto(AbstractXMLObjectMarshaller.java:224)
15:38:55,212 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:175)
15:38:55,212 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshallChildElements(AbstractXMLObjectMarshaller.java:316)
15:38:55,212 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshallInto(AbstractXMLObjectMarshaller.java:224)
15:38:55,212 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:130)
15:38:55,212 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:86)

I created a DelegateType element like this:

// the delegate
bf.registerBuilder(Delegate.DEFAULT_ELEMENT_NAME, new
DelegateBuilder());
DelegateBuilder del_builder =
(DelegateBuilder)bf.getBuilder(Delegate.DEFAULT_ELEMENT_NAME);
Delegate delegate = del_builder.buildObject();
delegate.setDelegationInstant(dtNow);
// the nameid of the delegatee
NameIDBuilder nid_builder2 =
(NameIDBuilder)bf.getBuilder(NameID.DEFAULT_ELEMENT_NAME);
NameID delegate_nid = nid_builder2.buildObject();
delegate_nid.setFormat(this.nameIdFormat);
delegate_nid.setValue(xspa_subject_id);
delegate.setNameID(delegate_nid);
// the delegatee can be confirmed by this identity provider

delegate.setConfirmationMethod(NameSpaceConstants.SENDER_VOUCHES);

bf.registerBuilder(DelegationRestrictionType.DEFAULT_ELEMENT_NAME,
new DelegationRestrictionTypeBuilder());
DelegationRestrictionTypeBuilder drtb =
(DelegationRestrictionTypeBuilder)bf.getBuilder(DelegationRestrictionType.DEFAULT_ELEMENT_NAME);
DelegationRestrictionType drt = drtb.buildObject();
drt.getDelegates().add(delegate);


and marshalled like:

MarshallerFactory marshallerFactory = Configuration
.getMarshallerFactory();
// these marshallers are not enabled by default

marshallerFactory.registerMarshaller(DelegationRestrictionType.DEFAULT_ELEMENT_NAME,
new DelegationRestrictionTypeMarshaller());

marshallerFactory.registerMarshaller(Delegate.DEFAULT_ELEMENT_NAME,
new DelegateMarshaller());

Marshaller marshaller = marshallerFactory
.getMarshaller(Assertion.DEFAULT_ELEMENT_NAME);

try {
assertionElement = marshaller.marshall(assertion);


Where I'm wrong? The comment on the source code says that it can
depends on different DOM
implementation. How it can be?


--
Massimiliano Masi

http://www.mascanc.net/~max


  • DOM Element node adoption failed, , 04/24/2010

Archive powered by MHonArc 2.6.16.

Top of Page