JaxbHelper jaxb = JaxbHelper.get(BackupData.class);
String xml;
try {
xml = jaxb.marshal(data, true);
} catch (JAXBException e) {
throw new OpsException("Error serializing metadata", e);
}
byte[] data = Utf8.getBytes(xml);
try {
getStorageClient().putObject(containerName, path, data);
} catch (OpenstackException e) {
throw new OpsException("Error uploading metadata", e);
} catch (IOException e) {
throw new OpsException("Error uploading metadata", e);
}
}