Skip to Content.
Sympa Menu

mace-opensaml-users - how to insert an xmlobject into xml

Subject: OpenSAML user discussion

List archive

how to insert an xmlobject into xml


Chronological Thread 
  • From: owen nirvana <>
  • To:
  • Subject: how to insert an xmlobject into xml
  • Date: Mon, 12 Apr 2010 01:02:36 +0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=nLqGS/TBR4uxT648VBiQt6r117VoEPeQ+9nwUKoMTk7ONtIQNjp7lyTZcngs44NveZ hWlDxFqNE5CLIntAQTHBZ33lCaSa1GnQa9XqOYfdd0FQVgK2vyqWNhOr3g+8Ang7GJVl Dv6iOU/u9sxfQmO4TdYzVLuX92rta6FyOdAYg=

 I want create an assertion and insert into xml like soap message org wss header in soap message

the following is my code:

docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = docBuilder.parse(...); // doc is ok

Assertion assertion = createAssertion(...); // assertion is ok

AssertionMarshaller marshaller = new AssertionMarshaller();
Element elment = marshaller.marshall(assertion);

XMLHelper.adoptElement(element, doc);
XMLHelper.prettyPrintXML(doc);

but , doc is still the original xml document.

thanks for help.





Archive powered by MHonArc 2.6.16.

Top of Page