String[] missingDependencies = uploadResult.getMissingWsdlFiles();
List<ServerFile> existingDependenciesList = Lists.newArrayList();
if( existingDependencies != null && existingDependencies.length > 0 ) {
for( CWsdlFile existingDep : existingDependencies ) {
ServerFile file = ServerFile.fromPathAndHash(existingDep.getWsdlLocator(), existingDep.getMD5());
existingDependenciesList.add(file);
}
}
ServerInfo server = new ServerInfo(serverId, serverName);
ServerFile uploadedFile = ServerFile.fromPathAndCompressedContents(wsdlLocator, md5, compressedBase64contents);
ServerFileUploadResult result = new ServerFileUploadResult(server, uploadedFile, missingDependencies, existingDependenciesList);
callback.fileWasUploaded(result);
}
catch (RemoteException e) {
callback.caught(convert(e));