Method: Soaspec::SoapHandler#initialize

Defined in:
lib/soaspec/exchange_handlers/soap_handler.rb

#initialize(name = self.class.to_s, options = {}) ⇒ SoapHandler

Setup object to handle communicating with a particular SOAP WSDL

Parameters:



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/soaspec/exchange_handlers/soap_handler.rb', line 73

def initialize(name = self.class.to_s, options = {})
  if name.is_a?(Hash) && options == {} # If name is not set
    options = name
    name = self.class.to_s
  end
  super
  set_remove_keys(options, i[operation default_hash template_name])
  merged_options = Soaspec::SpecLogger.log_api_traffic? ? default_options.merge(logging_options) : default_options
  merged_options.merge! savon_options
  merged_options.merge!(options)
  self.client = Savon.client(merged_options)
end