docs: private void addSoapFault(SoapMessage response, SoapFault replyMessage) throws TransformerException {
          SoapBody soapBody = response.getSoapBody();
          org.springframework.ws.soap.SoapFault soapFault;
          
          if (SoapFaultDefinition.SERVER.equals(replyMessage.getFaultCodeQName()) ||
                  SoapFaultDefinition.RECEIVER.equals(replyMessage.getFaultCodeQName())) {
              soapFault = soapBody.addServerOrReceiverFault(replyMessage.getFaultString(),
                      replyMessage.getLocale());
          } else if (SoapFaultDefinition.CLIENT.equals(replyMessage.getFaultCodeQName()) ||
                  SoapFaultDefinition.SENDER.equals(replyMessage.getFaultCodeQName())) {
              soapFault = soapBody.addClientOrSenderFault(replyMessage.getFaultString(),
                      replyMessage.getLocale());
          } else if (soapBody instanceof Soap11Body) {
              Soap11Body soap11Body = (Soap11Body) soapBody;
              soapFault = soap11Body.addFault(replyMessage.getFaultCodeQName(),
                      replyMessage.getFaultString(),
                      replyMessage.getLocale());
          } else if (soapBody instanceof Soap12Body) {
              Soap12Body soap12Body = (Soap12Body) soapBody;
              Soap12Fault soap12Fault = soap12Body.addServerOrReceiverFault(replyMessage.getFaultString(),
                              replyMessage.getLocale());
              soap12Fault.addFaultSubcode(replyMessage.getFaultCodeQName());
              
              soapFault = soap12Fault;
          } else {
                  throw new CitrusRuntimeException("Found unsupported SOAP implementation. Use SOAP 1.1 or SOAP 1.2.");
          }
          
          if (replyMessage.getFaultActor() != null) {
              soapFault.setFaultActorOrRole(replyMessage.getFaultActor());
          }
          
          List<String> soapFaultDetails = replyMessage.getFaultDetails();
          if (!soapFaultDetails.isEmpty()) {
              TransformerFactory transformerFactory = TransformerFactory.newInstance();
              Transformer transformer = transformerFactory.newTransformer();
              
              transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
              
              SoapFaultDetail faultDetail = soapFault.addFaultDetail();
              for (int i = 0; i < soapFaultDetails.size(); i++) {
                  transformer.transform(new StringSource(soapFaultDetails.get(i)), faultDetail.getResult());
              }
          }
      }