/** Adds Fault subcodes from {@link SOAPFault} to {@link #code} */ private void fillFaultSubCodes(SOAPFault fault) throws SOAPException { Iterator subcodes = fault.getFaultSubcodes(); SubcodeType firstSct = null; while (subcodes.hasNext()) { QName subcode = (QName) subcodes.next(); if (firstSct == null) { firstSct = new SubcodeType(subcode); code.setSubcode(firstSct); continue; } SubcodeType nextSct = new SubcodeType(subcode); firstSct.setSubcode(nextSct); firstSct = nextSct; } }
/** Recursively populate the Subcodes */ private void fillFaultSubCodes(SOAPFault fault, SubcodeType subcode) throws SOAPException { if (subcode != null) { fault.appendFaultSubcode(subcode.getValue()); fillFaultSubCodes(fault, subcode.getSubcode()); } }