while (eachTextElement.hasNext()) {
SOAPElement textElement = (SOAPElement) eachTextElement.next();
Locale thisLocale = getLocale(textElement);
if (thisLocale == null) {
log.severe("SAAJ0431.ver1_2.xml.lang.missing");
throw new SOAPExceptionImpl("\"xml:lang\" attribute is not present on the Text element");
}
localeSet.add(thisLocale);
}
if (localeSet.isEmpty()) {
log.severe("SAAJ0434.ver1_2.text.element.not.present");
throw new SOAPExceptionImpl("env:Text elements with mandatory xml:lang attributes must be present inside env:Reason");
}
return localeSet.iterator();
}