}
//throw new WSSecureConversationException(LogStringsMessages.WSSTUBE_0026_NO_POLICY_FOUND_FOR_SC());
return null;
}
//Note: Assuming only one SC assertion
Token tok = (Token) toks.get(0);
IssuedTokenContext ctx =
issuedTokenContextMap.get(tok.getTokenId());
PolicyAssertion scClientAssertion = null;
if (wsscConfig != null) {
Iterator it = wsscConfig.iterator();
while (it != null && it.hasNext()) {
scClientAssertion = (PolicyAssertion) it.next();
}
}
if (ctx == null) {
try {
SCTokenConfiguration config = new DefaultSCTokenConfiguration(wsscVer.getNamespaceURI(),
(SecureConversationToken) tok, tubeConfig.getWSDLPort(), tubeConfig.getBinding(),
this, packet, addVer, scClientAssertion, super.next);
ctx = itm.createIssuedTokenContext(config, packet.endpointAddress.toString());
itm.getIssuedToken(ctx);
issuedTokenContextMap.put(tok.getTokenId(), ctx);
//PolicyID to sctID map
SCTokenConfiguration sctConfig = (SCTokenConfiguration) ctx.getSecurityPolicy().get(0);
scPolicyIDtoSctIdMap.put(tok.getTokenId(), sctConfig.getTokenId());
} catch (WSTrustException se) {
log.log(Level.SEVERE,
LogStringsMessages.WSSTUBE_0035_ERROR_ISSUEDTOKEN_CREATION(), se);
throw new WebServiceException(LogStringsMessages.WSSTUBE_0035_ERROR_ISSUEDTOKEN_CREATION(), se);
}