SOAPFaultReason reason = this.fault.getReason();
if (reason.getFirstSOAPText() != null) {
reason.getFirstSOAPText().setText(faultString);
reason.getFirstSOAPText().setLang(locale.getLanguage());
} else {
SOAPFaultText text = new SOAP11FaultTextImpl(reason,
(SOAPFactory) this.element.getOMFactory());
text.setText(faultString);
text.setLang(locale.getLanguage());
reason.addSOAPText(text);
}
} else {
SOAPFaultReason reason = new SOAP11FaultReasonImpl(this.fault,
(SOAPFactory) this.element.getOMFactory());
SOAPFaultText text = new SOAP11FaultTextImpl(reason,
(SOAPFactory) this.element.getOMFactory());
text.setText(faultString);
text.setLang(locale.getLanguage());
reason.addSOAPText(text);
this.fault.setReason(reason);
}
this.faultReasonLocale = locale;
}