Class ServiceResponse

    • Constructor Detail

      • ServiceResponse

        public ServiceResponse​(SoapFaultDetails soapFaultDetails)
        Initializes a new instance.
        Parameters:
        soapFaultDetails - The SOAP fault details.
    • Method Detail

      • loaded

        protected void loaded()
        Called when the response has been loaded from XML.
      • mapErrorCodeToErrorMessage

        protected void mapErrorCodeToErrorMessage()
        Called after the response has been loaded from XML in order to map error codes to "better" error messages.
      • loadExtraErrorDetailsFromXml

        protected boolean loadExtraErrorDetailsFromXml​(EwsServiceXmlReader reader,
                                                       String xmlElementName)
                                                throws Exception
        Loads extra error details from XML
        Parameters:
        reader - The reader.
        xmlElementName - The current element name of the extra error details.
        Returns:
        True if the expected extra details is loaded; False if the element name does not match the expected element.
        Throws:
        Exception
      • getBatchProcessingStopped

        protected boolean getBatchProcessingStopped()
        Gets a value indicating whether a batch request stopped processing before the end.
        Returns:
        A value indicating whether a batch request stopped processing before the end.
      • getResult

        public ServiceResult getResult()
        Gets the result associated with this response.
        Returns:
        The result associated with this response.
      • getErrorCode

        public ServiceError getErrorCode()
        Gets the error code associated with this response.
        Returns:
        The error code associated with this response.
      • getErrorMessage

        public String getErrorMessage()
        Gets a detailed error message associated with the response. If Result is set to Success, ErrorMessage returns null. ErrorMessage is localized according to the PreferredCulture property of the ExchangeService object that was used to call the method that generated the response.
        Returns:
        the error message
      • setErrorMessage

        protected void setErrorMessage​(String errorMessage)
        Sets a detailed error message associated with the response.
        Parameters:
        errorMessage - The error message associated with the response.
      • getErrorDetails

        public Map<String,​StringgetErrorDetails()
        Gets error details associated with the response. If Result is set to Success, ErrorDetailsDictionary returns null. Error details will only available for some error codes. For example, when error code is ErrorRecurrenceHasNoOccurrence, the ErrorDetailsDictionary will contain keys for EffectiveStartDate and EffectiveEndDate.
        Returns:
        The error details dictionary.
      • getErrorProperties

        public Collection<PropertyDefinitionBasegetErrorProperties()
        Gets information about property errors associated with the response. If Result is set to Success, ErrorProperties returns null. ErrorProperties is only available for some error codes. For example, when the error code is ErrorInvalidPropertyForOperation, ErrorProperties will contain the definition of the property that was invalid for the request.
        Returns:
        the error property