throw new XWSSecurityException("Elements under Signature are not as per defined schema"+
" or error must have occurred while processing SignedInfo for Signature with ID"+id);
}
// StreamUtil.writeCurrentEvent(reader,canonWriter);
securityContext.setInferredKB(null);
KeyInfoProcessor kip = new KeyInfoProcessor(context,Purpose.VERIFY);
key = kip.getKey(reader);
if (key instanceof PublicKey) {
X509Certificate cert = null;
try {
cert = context.getSecurityEnvironment().getCertificate(context.getExtraneousProperties(), (PublicKey) key, false);
} catch (XWSSecurityException ex) {