public class ServiceResponse extends Object
Constructor and Description |
---|
ServiceResponse()
Initializes a new instance.
|
ServiceResponse(SoapFaultDetails soapFaultDetails)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
getBatchProcessingStopped()
Gets a value indicating whether a batch request stopped processing before
the end.
|
ServiceError |
getErrorCode()
Gets the error code associated with this response.
|
Map<String,String> |
getErrorDetails()
Gets error details associated with the response.
|
String |
getErrorMessage()
Gets a detailed error message associated with the response.
|
Collection<PropertyDefinitionBase> |
getErrorProperties()
Gets information about property errors associated with the response.
|
ServiceResult |
getResult()
Gets the result associated with this response.
|
protected void |
internalThrowIfNecessary()
Internal method that throws a ServiceResponseException if this response
has its Result property set to Error.
|
protected void |
loaded()
Called when the response has been loaded from XML.
|
protected boolean |
loadExtraErrorDetailsFromXml(EwsServiceXmlReader reader,
String xmlElementName)
Loads extra error details from XML
|
void |
loadFromXml(EwsServiceXmlReader reader,
String xmlElementName)
Loads response from XML.
|
protected void |
mapErrorCodeToErrorMessage()
Called after the response has been loaded from XML in order to map error
codes to "better" error messages.
|
protected void |
parseMessageXml(EwsServiceXmlReader reader)
Parses the message XML.
|
protected void |
readElementsFromXml(EwsServiceXmlReader reader)
Reads response elements from XML.
|
protected void |
setErrorMessage(String errorMessage)
Sets a detailed error message associated with the response.
|
void |
throwIfNecessary()
Throws a ServiceResponseException if this response has its Result
property set to Error.
|
public ServiceResponse()
public ServiceResponse(SoapFaultDetails soapFaultDetails)
soapFaultDetails
- The SOAP fault details.public void loadFromXml(EwsServiceXmlReader reader, String xmlElementName) throws Exception
reader
- the readerxmlElementName
- the xml element nameException
- the exceptionprotected void parseMessageXml(EwsServiceXmlReader reader) throws Exception
reader
- The reader.Exception
- the exceptionprotected void loaded()
protected void mapErrorCodeToErrorMessage()
protected void readElementsFromXml(EwsServiceXmlReader reader) throws Exception
reader
- the readerException
- the exceptionprotected boolean loadExtraErrorDetailsFromXml(EwsServiceXmlReader reader, String xmlElementName) throws Exception
reader
- The reader.xmlElementName
- The current element name of the extra error details.Exception
public void throwIfNecessary() throws ServiceResponseException
ServiceResponseException
- the service response exceptionprotected void internalThrowIfNecessary() throws ServiceResponseException
ServiceResponseException
- the service response exceptionprotected boolean getBatchProcessingStopped()
public ServiceResult getResult()
public ServiceError getErrorCode()
public String getErrorMessage()
protected void setErrorMessage(String errorMessage)
errorMessage
- The error message associated with the response.public Map<String,String> getErrorDetails()
public Collection<PropertyDefinitionBase> getErrorProperties()
Copyright © 2012–2015 Microsoft. All rights reserved.