if (requestContext.getSecurityToken() == null)
throw new WSTrustException(logger.nullValueError("Token issued by STS"));
// construct the ws-trust security token response.
RequestedSecurityTokenType requestedSecurityToken = new RequestedSecurityTokenType();
SecurityToken contextSecurityToken = requestContext.getSecurityToken();
if (contextSecurityToken == null)
throw new WSTrustException(logger.nullValueError("Security Token from context"));
requestedSecurityToken.add(contextSecurityToken.getTokenValue());
RequestSecurityTokenResponse response = new RequestSecurityTokenResponse();
if (request.getContext() != null)
response.setContext(request.getContext());