try {
DataCacheService svc = Application.getCacheService();
WsdlFileServerCache cache = svc.getCache(WsdlFileServerCache.class);
File file = new File(pathOnClient);
byte[] contents = FileUtils.readFileToByteArray(file);
cache.cacheWsdlFile(result.getServer(), file.getName(), contents);
} catch (IOException ex) {
handleNonFatalError(ex);
} catch (DataCacheException ex) {
handleNonFatalError(ex);
}