In C#, I make an http post and get an xml in the response in the form of a byte array (bret), which I deserialize into a class easily:
MemoryStream m = new MemoryStream(bret);
XmlSerializer s = new XmlSerializer(typeof(TransactionResults));
TransactionResults t = (TransactionResults)s.Deserialize(m);
What would be the correct and easiest way to do the same in Java?