This repository was archived by the owner on Jun 18, 2024. It is now read-only.
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
AlternateMailboxCollection parses only the first entry #425
Open
Description
The loadFromXML(...) method of AlternateMailboxCollection checks the wrong end element, therefore only the first AlternateMailbox entry will be parsed and returned.
XmlElementNames.AlternateMailbox must be replaced with XmlElementNames.AlternateMailboxes
The code should be corrected to:
public static AlternateMailboxCollection loadFromXml(EwsXmlReader reader)
throws Exception {
AlternateMailboxCollection instance = new AlternateMailboxCollection();
do {
reader.read();
if ((reader.getNodeType().getNodeType() == XmlNodeType.START_ELEMENT) &&
(reader.getLocalName()
.equals(XmlElementNames.AlternateMailbox))) {
instance.getEntries().add(
AlternateMailbox.loadFromXml(reader));
}
} while (!reader.isEndElement(XmlNamespace.Autodiscover,
XmlElementNames.AlternateMailboxes));
return instance;
}