SOAP12Fault(CodeType code, ReasonType reason, String node, String role, Element detailObject) {
   this.code = code;
   this.reason = reason;
   this.node = node;
   this.role = role;
   if (detailObject != null) {
     if (detailObject.getNamespaceURI().equals(ns)
         && detailObject.getLocalName().equals("Detail")) {
       detail = new DetailType();
       for (Element detailEntry : DOMUtil.getChildElements(detailObject)) {
         detail.getDetails().add(detailEntry);
       }
     } else {
       detail = new DetailType(detailObject);
     }
   }
 }
  SOAP12Fault(SOAPFault fault) {
    code = new CodeType(fault.getFaultCodeAsQName());
    try {
      fillFaultSubCodes(fault);
    } catch (SOAPException e) {
      throw new WebServiceException(e);
    }

    reason = new ReasonType(fault.getFaultString());
    role = fault.getFaultRole();
    node = fault.getFaultNode();
    if (fault.getDetail() != null) {
      detail = new DetailType();
      Iterator iter = fault.getDetail().getDetailEntries();
      while (iter.hasNext()) {
        Element fd = (Element) iter.next();
        detail.getDetails().add(fd);
      }
    }
  }