Reader reader = new StringReader(xmlString);
InputSource src = new InputSource(reader);
SOAPBodyElement bodyItem = getFirstBody(src);
assertTrue("The SOAPBodyElement I got was not a SOAPFault, it was a " +
bodyItem.getClass().getName(), bodyItem instanceof SOAPFault);
SOAPFault flt = (SOAPFault)bodyItem;
flt.addDetail();
javax.xml.soap.Detail d = flt.getDetail();
Iterator i = d.getDetailEntries();
while (i.hasNext())
{
DetailEntry entry = (DetailEntry) i.next();
String name = entry.getElementName().getLocalName();