try {
cbHandler = getPasswordCallbackHandler(reqData);
} catch (WSSecurityException sec) {
Endpoint ep = ((SoapMessage)reqData.getMsgContext()).getExchange().get(Endpoint.class);
if (ep != null && ep.getEndpointInfo() != null) {
TokenStore store = (TokenStore)ep.getEndpointInfo()
.getProperty(TokenStore.class.getName());
if (store != null) {
return new TokenStoreCallbackHandler(null, store);
}
}
throw sec;
}
}
}
Endpoint ep = ((SoapMessage)reqData.getMsgContext()).getExchange().get(Endpoint.class);
if (ep != null && ep.getEndpointInfo() != null) {
TokenStore store = (TokenStore)ep.getEndpointInfo().getProperty(TokenStore.class.getName());
if (store != null) {
return new TokenStoreCallbackHandler(cbHandler, store);
}
}
return cbHandler;