List<Object> exts = rst.getExtensionElements();
if (exts.size() > 0){
token = (Element)exts.get(0);
}
}else{
ValidateTarget vt = rst.getValidateTarget();
token = (Element)vt.getAny();
}
context.setTarget(new GenericToken(token));
// Get STSTokenProvider and validate the token
STSTokenProvider tokenProvider = WSTrustFactory.getSTSTokenProvider();