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/http/part.rb,
lib/handsoap/xml_mason.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/curb_driver.rb,
lib/handsoap/http/drivers/mock_driver.rb,
lib/handsoap/http/drivers/abstract_driver.rb,
lib/handsoap/http/drivers/net_http_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

+ (Object) follow_redirects!

Tell Handsoap to follow redirects



48
49
50
# File 'lib/handsoap/service.rb', line 48

def self.follow_redirects!
  @follow_redirects = true
end

+ (Boolean) follow_redirects?

Check whether Handsoap should follow redirects



53
54
55
# File 'lib/handsoap/service.rb', line 53

def self.follow_redirects?
  @follow_redirects || false
end

+ (Object) http_driver



18
19
20
# File 'lib/handsoap/service.rb', line 18

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

+ (Object) http_driver=(driver)



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

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

+ (Object) max_redirects

Fetches the max number of redirects The default is 1



64
65
66
# File 'lib/handsoap/service.rb', line 64

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

+ (Object) max_redirects=(max_redirects)

Sets the max number of redirects



58
59
60
# File 'lib/handsoap/service.rb', line 58

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

+ (Object) pretty_format_envelope(xml_string)



510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/handsoap/service.rb', line 510

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

+ (Object) store_raw_response=(boolean)



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

def self.store_raw_response=(boolean)
  @store_raw_response = boolean
end

+ (Boolean) store_raw_response?



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

def self.store_raw_response?
  !!@store_raw_response
end

+ (Object) timeout

fetches the timeout the default timeout is set to 60seconds



43
44
45
# File 'lib/handsoap/service.rb', line 43

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

+ (Object) timeout=(timeout)

Sets the timeout



37
38
39
# File 'lib/handsoap/service.rb', line 37

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

+ (Object) xml_query_driver



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

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

+ (Object) xml_query_driver=(driver)



32
33
34
# File 'lib/handsoap/service.rb', line 32

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