* Also parses the catalog to get it ready for resolution.
* @param cl - Classloader of the composite passes to this ServiceDescription
* @return a catalogManager with parsed catalog, or null if no catalog found
*/
private JAXWSCatalogManager createCatalogManager(ClassLoader cl) {
JAXWSCatalogManager returnCatalogManager = null;
try {
URL catalogURL = cl.getResource(
OASISCatalogManager.DEFAULT_CATALOG_WEB);
if (catalogURL == null) {
catalogURL = cl.getResource(
OASISCatalogManager.DEFAULT_CATALOG_EJB);
if (catalogURL != null) {
if (log.isDebugEnabled()) {
log.debug("Found JAX-WS catalog in EJB file");
}
returnCatalogManager = new OASISCatalogManager(cl);
returnCatalogManager.getCatalog().parseCatalog(catalogURL);
}
} else {
if (log.isDebugEnabled()) {
log.debug("Found JAX-WS catalog in WAR file");
}
returnCatalogManager = new OASISCatalogManager(cl);
returnCatalogManager.getCatalog().parseCatalog(catalogURL);
}
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug("ServiceDescriptionImpl caught exception from parseCatalog ",e);
}