);
and change:
XMLSignature signature = xmlSigFactory.newXMLSignature(si, ki,
Collections.singletonList(xmlobj), reference, null);
to:
XMLSignature signature = xmlSigFactory.newXMLSignature(si, ki, null, reference,
null);
you should be all set.
--Sean
Richard Sand wrote:
> Hi Sean,
>
riter sw = new StringWriter();
XMLSerializer ser = new XMLSerializer(sw, new
OutputFormat(doc));
ser.serialize(doc.getDocumentElement());
String XMLStr = sw.toString();
return XMLStr;
}
}
Best regards,
Richard A. Sand
g to insert the Signature
element as a child element of the root element of the same document. You really
should create a brand new Document object to insert the Signature in and then
pass the root Element of that document to the DOMSignContext above.
--Sean
Richard Sand wrote:
> Hi Sean,
&
ntent = new DOMStructure(doc);
to:
XMLStructure content = new
DOMStructure(doc.getDocumentElement());
--Sean
Richard Sand wrote:
> Hi all,
>
> I'm sure this has been encountered before... I'm trying to use the XML
> security API to sign a SOAP request.
Hi all,
I'm sure this has been encountered before... I'm trying to use the XML security
API to sign a SOAP request. For various reasons I'm not using WS-Security, only
XML security.
I've gone through the sample code provided with the API and I can see that the
enveloping sample does not load t