private static Block[] getDetailBlocks(javax.xml.soap.SOAPFault soapFault)
throws WebServiceException {
try {
Block[] blocks = null;
Detail detail = soapFault.getDetail();
if (detail != null) {
// Get a SAAJ->OM converter
SAAJConverterFactory converterFactory = (SAAJConverterFactory)FactoryRegistry
.getFactory(SAAJConverterFactory.class);
SAAJConverter converter = converterFactory.getSAAJConverter();
// Create a block for each element
OMBlockFactory bf =
(OMBlockFactory)FactoryRegistry.getFactory(OMBlockFactory.class);
ArrayList<Block> list = new ArrayList<Block>();
Iterator it = detail.getChildElements();
while (it.hasNext()) {
DetailEntry de = (DetailEntry)it.next();
OMElement om = converter.toOM(de);
Block b = bf.createFrom(om, null, om.getQName());
list.add(b);