if (log.isDebugEnabled()) {
log.debug("ProxyService Update from file : " + fileName + " : Started");
}
try {
ProxyService proxy = ProxyServiceFactory.createProxy(artifactConfig, properties);
if (proxy != null) {
proxy.setFileName((new File(fileName)).getName());
if (log.isDebugEnabled()) {
log.debug("ProxyService named '" + proxy.getName()
+ "' has been built from the file " + fileName);
}
initializeProxy(proxy);
if (log.isDebugEnabled()) {
log.debug("Initialized the ProxyService : " + proxy.getName());
}
proxy.stop(getSynapseConfiguration());
getSynapseConfiguration().removeProxyService(existingArtifactName);
if (!existingArtifactName.equals(proxy.getName())) {
log.info("ProxyService named " + existingArtifactName + " has been Undeployed");
}
proxy.buildAxisService(getSynapseConfiguration(),
getSynapseConfiguration().getAxisConfiguration());
if (log.isDebugEnabled()) {
log.debug("Started the ProxyService : " + proxy.getName());
}
getSynapseConfiguration().addProxyService(proxy.getName(), proxy);
if (log.isDebugEnabled()) {
log.debug("ProxyService " + (existingArtifactName.equals(proxy.getName()) ?
"update" : "deployment") + " from file : " + fileName + " : Completed");
}
log.info("ProxyService named '" + proxy.getName()
+ "' has been " + (existingArtifactName.equals(proxy.getName()) ?
"update" : "deployed") + " from file : " + fileName);
return proxy.getName();
} else {
handleSynapseArtifactDeploymentError("ProxyService Update Failed. The artifact " +
"described in the file " + fileName + " is not a ProxyService");
}
} catch (Exception e) {