RegressionTestRecord [b]record [/b]= new RegressionTestRecord();
record.setRecordId(Long.valueOf(currentRegressionSeq));
record.setTestScope(testScope);
String message = [color=red]marshal[/color]([b]record[/b]);
private static String [color=red]marshal[/color](Object object) {
OutputStream os = new ByteArrayOutputStream();
String xmlStr = null;
try {
[b][color=blue]JAXBContext.newInstance(new Class[] { object.getClass() }).createMarshaller().marshal(object, os);[/color][/b] xmlStr = os.toString();
} catch (JAXBException e) {
String errorMsg = "Failed to parse the object to xml string with error: " + e.getMessage();
LOGGER.error(errorMsg);
throw new RuntimeException(errorMsg);
} finally {
if (os != null) {
os = null;
}
}
return xmlStr;
}
record.setRecordId(Long.valueOf(currentRegressionSeq));
record.setTestScope(testScope);
String message = [color=red]marshal[/color]([b]record[/b]);
private static String [color=red]marshal[/color](Object object) {
OutputStream os = new ByteArrayOutputStream();
String xmlStr = null;
try {
[b][color=blue]JAXBContext.newInstance(new Class[] { object.getClass() }).createMarshaller().marshal(object, os);[/color][/b] xmlStr = os.toString();
} catch (JAXBException e) {
String errorMsg = "Failed to parse the object to xml string with error: " + e.getMessage();
LOGGER.error(errorMsg);
throw new RuntimeException(errorMsg);
} finally {
if (os != null) {
os = null;
}
}
return xmlStr;
}