ReadResponseWithHeaders method
Object
ReadResponseWithHeaders(
- EwsServiceXmlReader ewsXmlReader,
- WebHeaderCollection? responseHeaders
Implementation
Object ReadResponseWithHeaders(
EwsServiceXmlReader ewsXmlReader, WebHeaderCollection? responseHeaders) {
Object serviceResponse;
this.ReadPreamble(ewsXmlReader);
ewsXmlReader.ReadStartElementWithNamespace(
XmlNamespace.Soap, XmlElementNames.SOAPEnvelopeElementName);
this._ReadSoapHeader(ewsXmlReader);
ewsXmlReader.ReadStartElementWithNamespace(
XmlNamespace.Soap, XmlElementNames.SOAPBodyElementName);
ewsXmlReader.ReadStartElementWithNamespace(
XmlNamespace.Messages, this.GetResponseXmlElementName());
if (responseHeaders != null) {
serviceResponse =
this.ParseResponseWithHeaders(ewsXmlReader, responseHeaders);
} else {
serviceResponse = this.ParseResponse(ewsXmlReader);
}
ewsXmlReader.ReadEndElementIfNecessary(
XmlNamespace.Messages, this.GetResponseXmlElementName());
ewsXmlReader.ReadEndElementWithNamespace(
XmlNamespace.Soap, XmlElementNames.SOAPBodyElementName);
ewsXmlReader.ReadEndElementWithNamespace(
XmlNamespace.Soap, XmlElementNames.SOAPEnvelopeElementName);
return serviceResponse;
}