public boolean isCached() { if (wsdlContext != null && wsdlContext.isCached()) { return true; } DefinitionCacheConfig cacheConfig = getConfig().getDefinitionCache(); if (cacheConfig == null || cacheConfig.getRootPart() == null || cacheConfig.sizeOfPartArray() == 0) return false; return true; }
public DefinitionCacheConfig cacheDefinition(WsdlLoader loader) throws Throwable { log.debug("Caching definition for [" + loader.getBaseURI() + "]"); if (getConfig().isSetDefinitionCache()) getConfig().unsetDefinitionCache(); DefinitionCacheConfig definitionCache = null; try { definitionCache = getConfig().addNewDefinitionCache(); definitionCache.set(WsdlUtils.cacheWsdl(loader)); } catch (Throwable e) { getConfig().unsetDefinitionCache(); throw e; } return definitionCache; }