private String resolveByCatalog(String url) {
if (StringUtils.isEmpty(url)) {
return null;
}
Bus bus = (Bus)env.get(Bus.class);
OASISCatalogManager catalogResolver = OASISCatalogManager.getCatalogManager(bus);
if (catalogResolver == null) {
return null;
}
String resolvedLocation;
try {
resolvedLocation = catalogResolver.resolveSystem(url);
if (resolvedLocation == null) {
resolvedLocation = catalogResolver.resolveURI(url);
}
} catch (Exception e1) {
Message msg = new Message("FAILED_RESOLVE_CATALOG", LOG, url);
throw new ToolException(msg, e1);
}