/** * Writes the delete update to XML. * * @param writer the writer * @param ewsObject the ews object * @return True if update XML was written. * @throws XMLStreamException the xML stream exception * @throws ServiceXmlSerializationException the service xml serialization exception */ @Override protected boolean writeDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject) throws XMLStreamException, ServiceXmlSerializationException { for (String xmlElementName : PhysicalAddressSchema.getXmlElementNames()) { this.internalWriteDeleteFieldToXml(writer, ewsObject, xmlElementName); } return true; }
/** * Writes elements to XML. * * @param reader the reader * @return true, if successful * @throws Exception the exception */ @Override protected boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception { if (PhysicalAddressSchema.getXmlElementNames().contains(reader.getLocalName())) { this.propertyBag.setSimplePropertyBag(reader.getLocalName(), reader.readElementValue()); return true; } else { return false; } }
/** * Writes elements to XML. * * @param writer the writer * @throws XMLStreamException the xML stream exception * @throws ServiceXmlSerializationException the service xml serialization exception */ @Override protected void writeElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException { for (String xmlElementName : PhysicalAddressSchema.getXmlElementNames()) { writer.writeElementValue( XmlNamespace.Types, xmlElementName, this.propertyBag.getSimplePropertyBag(xmlElementName)); } }