message.getExchange().remove(SecurityConstants.TOKEN_ID);
message.getExchange().remove(SecurityConstants.TOKEN);
NegotiationUtils.getTokenStore(message).remove(tok);
STSClient client = STSUtils.getClient(message, "sct");
AddressingProperties maps =
(AddressingProperties)message
.get("javax.xml.ws.addressing.context.outbound");
if (maps == null) {
maps = (AddressingProperties)message
.get("javax.xml.ws.addressing.context");
} else if (maps.getAction().getValue().endsWith("Renew")) {
return;
}
synchronized (client) {
try {
SecureConversationTokenInterceptorProvider.setupClient(client, message, aim, itok, true);
String s = message
.getContextualProperty(Message.ENDPOINT_ADDRESS).toString();
client.setLocation(s);
Map<String, Object> ctx = client.getRequestContext();
ctx.put(SecurityConstants.TOKEN, tok);
if (maps != null) {
client.setAddressingNamespace(maps.getNamespaceURI());
}
client.renewSecurityToken(tok);
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {