QName faultCode = new QName("http://www.springframework.org", "fault", "spring");
String faultString = "faultString";
SoapFault fault = ((Soap11Body) soapBody).addFault(faultCode, faultString, null);
SoapFaultDetail detail = fault.addFaultDetail();
QName detailName = new QName("http://www.springframework.org", "detailEntry", "spring");
SoapFaultDetailElement detailElement1 = detail.addFaultDetailElement(detailName);
StringSource detailContents = new StringSource("<detailContents xmlns='namespace'/>");
transformer.transform(detailContents, detailElement1.getResult());
SoapFaultDetailElement detailElement2 = detail.addFaultDetailElement(detailName);
detailContents = new StringSource("<detailContents xmlns='namespace'/>");
transformer.transform(detailContents, detailElement2.getResult());
assertPayloadEqual(
"<SOAP-ENV:Fault xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:spring='http://www.springframework.org'>" +
"<faultcode>spring:fault</faultcode>" + "<faultstring>" + faultString + "</faultstring>" +
"<detail>" +
"<spring:detailEntry xmlns:spring='http://www.springframework.org'><detailContents xmlns='namespace'/></spring:detailEntry>" +