The PacketParserUtils is now able to parse the condition text e.g. in a redirect error response. However the opposite is still missing: XMPPError.toXML() does not include the conditionText in the produced XML String:
public XmlStringBuilder toXML() { XmlStringBuilder xml = new XmlStringBuilder(); xml.halfOpenElement(ERROR); xml.attribute("type", type.toString()); xml.optAttribute("by", errorGenerator); xml.rightAngleBracket(); xml.halfOpenElement(condition.toString()); xml.xmlnsAttribute(NAMESPACE); // here I would insert: if (conditionText != null) { xml.rightAngleBracket(); xml.escape(conditionText); xml.closeElement(condition.toString()); } else { xml.closeEmptyElement(); } // then continue with addDescriptiveTextsAndExtensions(xml); xml.closeElement(ERROR); return xml; }
Martin