Packet packet, Subject clientSubject, boolean isSCMessage) throws XWSSecurityException {
// invoke the Trust Plugin if necessary
Message msg = packet.getInternalMessage();
invokeTrustPlugin(packet, isSCMessage);
ProcessingContext ctx = initializeOutgoingProcessingContext(packet, isSCMessage);
((ProcessingContextImpl)ctx).setIssuedTokenContextMap(issuedTokenContextMap);
((ProcessingContextImpl)ctx).setSCPolicyIDtoSctIdMap(scPolicyIDtoSctIdMap);
ctx.isClient(true);
if(hasKerberosTokenPolicy()){
populateKerberosContext(packet, (ProcessingContextImpl)ctx, isSCMessage);
}
if(isSCRenew(packet)){
SCTokenConfiguration config = new DefaultSCTokenConfiguration(wsscVer.getNamespaceURI());
config.getOtherOptions().put("MessagePolicy", (MessagePolicy) ctx.getSecurityPolicy());
IssuedTokenContext itc =itm.createIssuedTokenContext(config, packet.endpointAddress.toString());
try{
itm.renewIssuedToken(itc);
}catch(WSTrustException se){
log.log(Level.SEVERE, LogStringsMessages.WSITPVD_0052_ERROR_ISSUEDTOKEN_CREATION(), se);