santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heiner Westphal <Heiner.Westp...@verit.de>
Subject Re: Enveloping signature: wrong document err.
Date Tue, 01 Feb 2005 16:40:39 GMT
> Axelle wrote:
[ snip ]
Wow, you are fast.
Sounds familiar. Took me some time to sort it out once upon a time...
> 
> // create the ds:Object
> Document doc = db.newDocument();
> ObjectContainer obj = new ObjectContainer(input);
Instead of:
> doc.appendChild(obj.getElement());
use:
boolean deepCopy = true;
Node payloadElem
    = signedDoc.importNode(doc.getDocumentElement(), deepCopy);
obj.appendChild(payloadElem);
doc.appendObject(obj);

That should do the trick.

Regards,

Heiner

Mime
View raw message