key = WSSecurityUtil.prepareSecretKey(signatureMethod, secretKey);
}
XMLValidateContext context = new DOMValidateContext(key, elem);
context.setProperty("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE);
URIDereferencer dereferencer = new DOMURIDereferencer();
((DOMURIDereferencer)dereferencer).setWsDocInfo(wsDocInfo);
context.setURIDereferencer(dereferencer);
context.setProperty(STRTransform.TRANSFORM_WS_DOC_INFO, wsDocInfo);
try {
XMLSignature xmlSignature = signatureFactory.unmarshalXMLSignature(context);