// build the token-provider and service-metadata maps.
TokenProvidersType providers = this.delegate.getTokenProviders();
if (providers != null)
{
WSTrustServiceFactory serviceFactory = WSTrustServiceFactory.getInstance();
for (TokenProviderType provider : providers.getTokenProvider())
{
// create and initialize the token provider.
SecurityTokenProvider tokenProvider = serviceFactory.createTokenProvider(provider.getProviderClass());
Map<String, String> properties = new HashMap<String, String>();
for(PropertyType propertyType : provider.getProperty())
properties.put(propertyType.getName(), propertyType.getValue());
tokenProvider.initialize(properties);
// token providers can be keyed by the token type and by token element + namespace.