+ RegistryResources.SERVICES + axisService.getName();
Resource serviceResource = registry.get(servicePath);
Association[] assoc = registry.getAssociations(servicePath, RegistryResources.Associations.PRIVATE_KEYSTORE);
KeyStoreManager keyStoreManager = KeyStoreManager.getInstance(null);
KeyStore keyStore = null;
if(assoc.length < 1){
boolean httpsEnabled = false;
Association[] associations =
registry.getAssociations(servicePath, RegistryResources.Associations.EXPOSED_TRANSPORTS);
for (Association association : associations) {
Resource resource = registry.get(association.getDestinationPath());
String transportProtocol = resource.getProperty(RegistryResources.Transports.PROTOCOL_NAME);
if(transportProtocol.equals("https")){
httpsEnabled = true;
break;
}
resource.discard();
}
if (httpsEnabled ||Boolean.valueOf(serviceResource.getProperty(RegistryResources.ServiceProperties.EXPOSED_ON_ALL_TANSPORTS))) {
keyStore = keyStoreManager.getPrimaryKeyStore();
}
} else {
KeyStore ks = null;
String kspath = assoc[0].getDestinationPath();
if(kspath.equals(RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE)){
keyStore = keyStoreManager.getPrimaryKeyStore();
}else{
String keyStoreName = kspath.substring(kspath.lastIndexOf("/")+1);
keyStore = keyStoreManager.getKeyStore(keyStoreName);
}
}
serviceResource.discard();
String alias = null;