}
// Set the Detail and contents of Detail
Block[] blocks = xmlFault.getDetailBlocks();
if (blocks != null && blocks.length > 0) {
SOAPFaultDetail detail = factory.createSOAPFaultDetail(soapFault);
if (!ignoreDetailBlocks) {
for (int i = 0; i < blocks.length; i++) {
// A Block implements OMDataSource. So create OMSourcedElements
// for each of the Blocks.
OMSourcedElement element =
factory.createOMElement(blocks[i], blocks[i].getQName());
detail.addChild(element);
}
}
}
// Now set all of the secondary fault information