/** * Read SOAP body. * * @param reader EwsXmlReader. * @return AutodiscoverResponse AutodiscoverResponse object * @throws Exception the exception */ protected AutodiscoverResponse readSoapBody(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.Soap, XmlElementNames.SOAPBodyElementName); AutodiscoverResponse responses = this.loadFromXml(reader); reader.readEndElement(XmlNamespace.Soap, XmlElementNames.SOAPBodyElementName); return responses; }
/** * Loads response from XML. * * @param reader The reader. * @return AutodiscoverResponse object * @throws Exception the exception */ protected AutodiscoverResponse loadFromXml(EwsXmlReader reader) throws Exception { String elementName = this.getResponseXmlElementName(); reader.readStartElement(XmlNamespace.Autodiscover, elementName); AutodiscoverResponse response = this.createServiceResponse(); response.loadFromXml(reader, elementName); return response; }
/** * Reads the element value. * * @param namespacePrefix the namespace prefix * @param localName the local name * @return String * @throws Exception the exception */ public String readElementValue(String namespacePrefix, String localName) throws Exception { if (!this.isStartElement(namespacePrefix, localName)) { this.readStartElement(namespacePrefix, localName); } String value = null; if (!this.isEmptyElement()) { value = this.readValue(); } return value; }
/** * Read SOAP header. * * @param reader EwsXmlReader. * @throws Exception the exception */ protected void readSoapHeaders(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.Soap, XmlElementNames.SOAPHeaderElementName); do { reader.read(); this.readSoapHeader(reader); } while (!reader.isEndElement(XmlNamespace.Soap, XmlElementNames.SOAPHeaderElementName)); }
/** * Reads the element value. * * @param <T> the generic type * @param cls the cls * @param xmlNamespace the xml namespace * @param localName the local name * @return T * @throws Exception the exception */ public <T> T readElementValue(Class<T> cls, XmlNamespace xmlNamespace, String localName) throws Exception { if (!this.isStartElement(xmlNamespace, localName)) { this.readStartElement(xmlNamespace, localName); } T value = null; if (!this.isEmptyElement()) { value = this.readValue(cls); } return value; }
/** * Loads the settings from XML. * * @param reader the reader * @throws Exception the exception */ public void loadFromXml(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Response); do { reader.read(); if (reader.isStartElement()) { if (!this.tryReadCurrentXmlElement(reader)) { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, XmlElementNames.Response)); reader.readEndElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); }
/** * Reads the element value. * * @param xmlNamespace the xml namespace * @param localName the local name * @return String * @throws Exception the exception */ public String readElementValue(XmlNamespace xmlNamespace, String localName) throws Exception { if (!this.isStartElement(xmlNamespace, localName)) { this.readStartElement(xmlNamespace, localName); } String value = null; if (!this.isEmptyElement()) { value = this.readValue(); } else { this.read(); } return value; }
/** * Skips the element. * * @param namespacePrefix the namespace prefix * @param localName the local name * @throws Exception the exception */ public void skipElement(String namespacePrefix, String localName) throws Exception { if (!this.isEndElement(namespacePrefix, localName)) { if (!this.isStartElement(namespacePrefix, localName)) { this.readStartElement(namespacePrefix, localName); } if (!this.isEmptyElement()) { do { this.read(); } while (!this.isEndElement(namespacePrefix, localName)); } } }
/** * Skips the element. * * @param xmlNamespace the xml namespace * @param localName the local name * @throws Exception the exception */ public void skipElement(XmlNamespace xmlNamespace, String localName) throws Exception { if (!this.isEndElement(xmlNamespace, localName)) { if (!this.isStartElement(xmlNamespace, localName)) { this.readStartElement(xmlNamespace, localName); } if (!this.isEmptyElement()) { do { this.read(); } while (!this.isEndElement(xmlNamespace, localName)); } } }
ewsXmlReader.readStartElement(XmlNamespace.Soap, XmlElementNames.SOAPEnvelopeElementName); } else if ((ewsXmlReader.getNodeType().getNodeType() != XmlNodeType.START_ELEMENT)
/** * Read SOAP body. * * @param reader EwsXmlReader. * @return AutodiscoverResponse AutodiscoverResponse object * @throws Exception the exception */ protected AutodiscoverResponse readSoapBody(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.Soap, XmlElementNames.SOAPBodyElementName); AutodiscoverResponse responses = this.loadFromXml(reader); reader.readEndElement(XmlNamespace.Soap, XmlElementNames.SOAPBodyElementName); return responses; }
/** * Read SOAP header. * * @param reader EwsXmlReader. * @throws Exception the exception */ protected void readSoapHeaders(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.Soap, XmlElementNames.SOAPHeaderElementName); do { reader.read(); this.readSoapHeader(reader); } while (!reader.isEndElement(XmlNamespace.Soap, XmlElementNames.SOAPHeaderElementName)); }
/** * Loads response from XML. * * @param reader The reader. * @return AutodiscoverResponse object * @throws Exception the exception */ protected AutodiscoverResponse loadFromXml(EwsXmlReader reader) throws Exception { String elementName = this.getResponseXmlElementName(); reader.readStartElement(XmlNamespace.Autodiscover, elementName); AutodiscoverResponse response = this.createServiceResponse(); response.loadFromXml(reader, elementName); return response; }
/** * Reads the element value. * * @param <T> the generic type * @param cls the cls * @param xmlNamespace the xml namespace * @param localName the local name * @return T * @throws Exception the exception */ public <T> T readElementValue(Class<T> cls, XmlNamespace xmlNamespace, String localName) throws Exception { if (!this.isStartElement(xmlNamespace, localName)) { this.readStartElement(xmlNamespace, localName); } T value = null; if (!this.isEmptyElement()) { value = this.readValue(cls); } return value; }
/** * Loads the settings from XML. * * @param reader the reader * @throws Exception the exception */ public void loadFromXml(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Response); do { reader.read(); if (reader.isStartElement()) { if (!this.tryReadCurrentXmlElement(reader)) { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, XmlElementNames.Response)); reader.readEndElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); }
/** * Reads the element value. * * @param namespacePrefix the namespace prefix * @param localName the local name * @return String * @throws Exception the exception */ public String readElementValue(String namespacePrefix, String localName) throws Exception { if (!this.isStartElement(namespacePrefix, localName)) { this.readStartElement(namespacePrefix, localName); } String value = null; if (!this.isEmptyElement()) { value = this.readValue(); } return value; }
/** * Reads the element value. * * @param xmlNamespace the xml namespace * @param localName the local name * @return String * @throws Exception the exception */ public String readElementValue(XmlNamespace xmlNamespace, String localName) throws Exception { if (!this.isStartElement(xmlNamespace, localName)) { this.readStartElement(xmlNamespace, localName); } String value = null; if (!this.isEmptyElement()) { value = this.readValue(); } else { this.read(); } return value; }
/** * Skips the element. * * @param xmlNamespace the xml namespace * @param localName the local name * @throws Exception the exception */ public void skipElement(XmlNamespace xmlNamespace, String localName) throws Exception { if (!this.isEndElement(xmlNamespace, localName)) { if (!this.isStartElement(xmlNamespace, localName)) { this.readStartElement(xmlNamespace, localName); } if (!this.isEmptyElement()) { do { this.read(); } while (!this.isEndElement(xmlNamespace, localName)); } } }
/** * Skips the element. * * @param namespacePrefix the namespace prefix * @param localName the local name * @throws Exception the exception */ public void skipElement(String namespacePrefix, String localName) throws Exception { if (!this.isEndElement(namespacePrefix, localName)) { if (!this.isStartElement(namespacePrefix, localName)) { this.readStartElement(namespacePrefix, localName); } if (!this.isEmptyElement()) { do { this.read(); } while (!this.isEndElement(namespacePrefix, localName)); } } }
ewsXmlReader.readStartElement(XmlNamespace.Soap, XmlElementNames.SOAPEnvelopeElementName); } else if ((ewsXmlReader.getNodeType().getNodeType() != XmlNodeType.START_ELEMENT)