if (msg.getInfo() != null)
elem.addContent(Util.createElement("info", msg.getInfo()));
}
public BasicResponseMessage readBasicResponseMessage(Element elem) {
BasicResponseMessage msg = new BasicResponseMessage();
List children = elem.getChildren();
Element child;
for (int i=0; i<children.size(); i++) {
child = (Element)children.get(i);
String name = child.getName().toLowerCase();
if (name.equals("operation"))
msg.setOperation(child.getText());
else if (name.equals("key"))
msg.setJobKey(child.getText());
else if (name.equals("result"))
msg.setResult(child.getText());
else if (name.equals("info"))
msg.setInfo(child.getText());
}
return msg;
}