Module: Handsoap

Defined in:
lib/handsoap/service.rb,
lib/handsoap/http.rb,
lib/handsoap/parser.rb,
lib/handsoap/service.rb,
lib/handsoap/compiler.rb,
lib/handsoap/xml_mason.rb,
lib/handsoap/xml_query_front.rb

Overview

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

Defined Under Namespace

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

Class Method Summary collapse

Class Method Details

.http_driverObject



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

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

.http_driver=(driver) ⇒ Object



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

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

.pretty_format_envelope(xml_string) ⇒ Object



298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/handsoap/service.rb', line 298

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

.xml_query_driverObject



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

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

.xml_query_driver=(driver) ⇒ Object



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

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