//HashMap tokenCache = wssContext.getTokenCache();
//HashMap insertedX509Cache = wssContext.getInsertedX509Cache();
Key returnKey = null;
if (reference instanceof KeyIdentifier) {
KeyIdentifier keyId = (KeyIdentifier) reference;
returnKey = resolveKeyIdentifier(context, keyId.getValueType(),
keyId.getReferenceValue(), null, purpose);
} else if (reference instanceof DirectReference) {
//WSSElementFactory elementFactory = new WSSElementFactory(wssContext.getSOAPVersion());
//DirectReference directRef = elementFactory.createDirectReference();