Wijlens, Joris (J.) wrote:
Hi,
So you are saying that there isn't a bug in your code and that if I parse a document "document" and select an Element "soapHeaderElement".
Then I create the element I want to add (the placeholder element for the signature) and add it to the soapHeaderElement like this:
Element element = document.createElementNS("http://blabla","myPrefix:myTagName");
element.setAttribute("myPrefix:myTagName"," http://blabla <http://blabla/>"));
soapHeaderElement.appendChiled(element);
and later I do
element.appendChild(signature.getElement());
signature.sign(privateKey);
I don't have to serialize the message before signing?
that's right. You don't need to serialize it.
Use the 1.2 version when release, or c14n the dom tree and send the byte array generated.
Thanks
Joris Wijlens
PS And what do I have to do to prevent all the xml namespaces showing up all over the document?
for example
Canonicalizer c14n =
Canonicalizer
.getInstance("http://www.w3.org/TR/2001/REC-xml-c14n-20010315");
byte outputBytes[] = c14n.canonicalizeSubtree(doc);
Regards,
p.s.- sorry for the delay.
Raul http://r-bg.com
