JAXBElement<String> jaxbTokenType =
QNameConstants.WS_TRUST_FACTORY.createTokenType(tokenRequirements.getTokenType());
response.getAny().add(jaxbTokenType);
// RequestedSecurityToken
RequestedSecurityTokenType requestedTokenType =
QNameConstants.WS_TRUST_FACTORY.createRequestedSecurityTokenType();
JAXBElement<RequestedSecurityTokenType> requestedToken =
QNameConstants.WS_TRUST_FACTORY.createRequestedSecurityToken(requestedTokenType);
LOG.fine("Encrypting Issued Token: " + encryptIssuedToken);
if (!encryptIssuedToken) {
requestedTokenType.setAny(tokenRenewerResponse.getToken());
} else {
requestedTokenType.setAny(
encryptToken(
tokenRenewerResponse.getToken(), tokenRenewerResponse.getTokenId(),
encryptionProperties, keyRequirements, webServiceContext
)
);