Module: Viewpoint::EWS::ConnectionHelper

Included in:
Connection
Defined in:
lib/ews/connection_helper.rb

Overview

This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.

Copyright 

Instance Method Summary collapse

Instance Method Details

#init_logging!Object



21
22
23
# File 'lib/ews/connection_helper.rb', line 21

def init_logging!
  @log = Logging.logger[self.class.name.to_s.to_sym]
end

#parse_soap_error(xml) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/ews/connection_helper.rb', line 26

def parse_soap_error(xml)
  ndoc = Nokogiri::XML(xml)
  ns = ndoc.collect_namespaces
  err_string  = ndoc.xpath("//faultstring",ns).text
  err_code    = ndoc.xpath("//faultcode",ns).text
  @log.debug "Internal SOAP error. Message: #{err_string}, Code: #{err_code}"
  [err_string, err_code]
end