Module: Handsoap

Defined in:
lib/handsoap/service.rb,
lib/handsoap/parser.rb,
lib/handsoap/service.rb,
lib/handsoap/deferred.rb,
lib/handsoap/compiler.rb,
lib/handsoap/xml_mason.rb,
lib/handsoap/http/part.rb,
lib/handsoap/http/drivers.rb,
lib/handsoap/http/request.rb,
lib/handsoap/http/response.rb,
lib/handsoap/xml_query_front.rb,
lib/handsoap/http/drivers/mock_driver.rb,
lib/handsoap/http/drivers/curb_driver.rb,
lib/handsoap/http/drivers/net_http_driver.rb,
lib/handsoap/http/drivers/abstract_driver.rb,
lib/handsoap/http/drivers/http_client_driver.rb,
lib/handsoap/http/drivers/event_machine_driver.rb

Overview

Legacy/BC code here. This shouldn't be used in new applications.

Defined Under Namespace

Modules: Http, Parser, XmlMason, XmlQueryFront Classes: AsyncDispatch, CodeWriter, Compiler, Deferred, Fault, HttpError, Service, SoapResponse

Class Method Summary collapse

Class Method Details

.follow_redirects!Object

Tell Handsoap to follow redirects



40
41
42
# File 'lib/handsoap/service.rb', line 40

def self.follow_redirects!
  @follow_redirects = true
end

.follow_redirects?Boolean

Check whether Handsoap should follow redirects

Returns:

  • (Boolean)


45
46
47
# File 'lib/handsoap/service.rb', line 45

def self.follow_redirects?
  @follow_redirects || false
end

.http_driverObject



10
11
12
# File 'lib/handsoap/service.rb', line 10

def self.http_driver
  @http_driver || (self.http_driver = :curb)
end

.http_driver=(driver) ⇒ Object



14
15
16
17
18
# File 'lib/handsoap/service.rb', line 14

def self.http_driver=(driver)
  @http_driver = driver
  Handsoap::Http.drivers[driver].load!
  return driver
end

.max_redirectsObject

Fetches the max number of redirects The default is 1



56
57
58
# File 'lib/handsoap/service.rb', line 56

def self.max_redirects
  @max_redirects || (self.max_redirects = 1)
end

.max_redirects=(max_redirects) ⇒ Object

Sets the max number of redirects



50
51
52
# File 'lib/handsoap/service.rb', line 50

def self.max_redirects=(max_redirects)
  @max_redirects = max_redirects
end

.pretty_format_envelope(xml_string) ⇒ Object



484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/handsoap/service.rb', line 484

def self.pretty_format_envelope(xml_string)
  if /^<.*:Envelope/.match(xml_string)
    begin
      doc = Handsoap::XmlQueryFront.parse_string(xml_string, Handsoap.xml_query_driver)
    rescue
      return xml_string
    end
    return doc.to_xml
    # return "\n\e[1;33m" + doc.to_s + "\e[0m"
  end
  return xml_string
end

.timeoutObject

fetches the timeout the default timeout is set to 60seconds



35
36
37
# File 'lib/handsoap/service.rb', line 35

def self.timeout
  @timeout || (self.timeout = 60)
end

.timeout=(timeout) ⇒ Object

Sets the timeout



29
30
31
# File 'lib/handsoap/service.rb', line 29

def self.timeout=(timeout)
  @timeout = timeout
end

.xml_query_driverObject



20
21
22
# File 'lib/handsoap/service.rb', line 20

def self.xml_query_driver
  @xml_query_driver || (self.xml_query_driver = :nokogiri)
end

.xml_query_driver=(driver) ⇒ Object



24
25
26
# File 'lib/handsoap/service.rb', line 24

def self.xml_query_driver=(driver)
  @xml_query_driver = Handsoap::XmlQueryFront.load_driver!(driver)
end