if (parentPath != null && parentPath.length() > 0) {
parentFile = new CXmlStructureFile();
parentFile.setPath(parentPath);
}
CXmlStructureFileUploadResult uploadResult = xmlInfo.uploadStructureFile(getConfiguration().getUserName(),
getConfiguration().getPassword(), inputFile, parentFile);
// This releases the file contents
sEncodedContents = null;
inputFile = null;
CXmlStructureFile resultFile = uploadResult.getXmlStructureFile();
ServerFile structureFile = ServerFile.fromPathAndHash(resultFile.getPath(), sMD5);
List<ServerFile> existingDependencies = Lists.newArrayList();
if (uploadResult.getExistingDependencies() != null) {
for (CXmlStructureFile dep : uploadResult.getExistingDependencies()) {
existingDependencies.add(ServerFile.fromPathAndHash(dep.getPath(), dep.getMD5()));
}
}
ServerFileUploadResult result = new ServerFileUploadResult(server, structureFile, uploadResult
.getMissingStructureFiles(), existingDependencies);
callback.fileWasUploaded(result);
} catch (RemoteException e) {
callback.caught(convert(e));