Module: Handsoap

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

Defined Under Namespace

Modules: Compiler, Parser, XmlMason Classes: Fault, Response, Service

Constant Summary collapse

SOAP_NAMESPACE =
{ 1 => 'http://schemas.xmlsoap.org/soap/envelope/', 2 => 'http://www.w3.org/2001/12/soap-encoding' }

Class Method Summary collapse

Class Method Details

.http_driverObject



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

def self.http_driver
  @http_driver || :curb
end

.http_driver=(driver) ⇒ Object



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

def self.http_driver=(driver)
  @http_driver = driver
end

.pretty_format_envelope(xml_string) ⇒ Object



283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/handsoap/service.rb', line 283

def self.pretty_format_envelope(xml_string)
  if /^<.*:Envelope/.match(xml_string)
    begin
      doc = Nokogiri::XML(xml_string)
    rescue Exception => ex
      return "Formatting failed: " + ex.to_s
    end
    return doc.to_s
    # return "\n\e[1;33m" + doc.to_s + "\e[0m"
  end
  return xml_string
end