Hi Community,
I sign a XML message (really, soap message) and then I sent it
to the server. The server could validate XML signed, but verification
fails (server say that signature is invalid :( )
The strange is if I implement signing line code and validate line in
same class, then all works (and signature is valid);
I think the problem it is in follow few lines:
DOMValidateContext valContext = new DOMValidateContext(new KeyValueKeySelector(), signatureTag); ^^^^^^^^^^^^^^^^^^ XMLSignature signature = sigFactory.unmarshalXMLSignature(valContext); // Validate the XMLSignature (generated above) boolean isSignatureValid= signature.validate(valContext);