if (! (keytype.toString().equalsIgnoreCase(wstVer.getSymmetricKeyTypeURI())
|| keytype.toString().equalsIgnoreCase(wstVer.getPublicKeyTypeURI())
|| keytype.toString().equalsIgnoreCase(wstVer.getBearerKeyTypeURI()) )){
log.log(Level.SEVERE,
LogStringsMessages.WST_0025_INVALID_KEY_TYPE(keytype.toString(), null));
throw new WSTrustException(LogStringsMessages.WST_0025_INVALID_KEY_TYPE(keytype.toString(), null));
} else {
this.keyType = keytype;
final JAXBElement<String> ktElement =
(new ObjectFactory()).createKeyType(keyType.toString());
getAny().add(ktElement);