module Symbiont::SoapObject
Attributes
response[R]
Public Class Methods
included(caller)
click to toggle source
# File lib/symbiont/service_objects.rb, line 8 def self.included(caller) caller.extend SoapMethods end
new()
click to toggle source
# File lib/symbiont/service_objects.rb, line 12 def initialize @client = Savon.client(client_properties) end
Public Instance Methods
body()
click to toggle source
# File lib/symbiont/service_objects.rb, line 28 def body response.body end
connected?()
click to toggle source
# File lib/symbiont/service_objects.rb, line 16 def connected? !@client.nil? end
doc()
click to toggle source
# File lib/symbiont/service_objects.rb, line 24 def doc response.doc end
operations()
click to toggle source
# File lib/symbiont/service_objects.rb, line 20 def operations @client.operations end
to_hash()
click to toggle source
# File lib/symbiont/service_objects.rb, line 40 def to_hash response.hash end
to_xml()
click to toggle source
# File lib/symbiont/service_objects.rb, line 36 def to_xml response.to_xml end
xpath(node)
click to toggle source
# File lib/symbiont/service_objects.rb, line 32 def xpath(node) response.xpath(node) end
Private Instance Methods
call(operation, data)
click to toggle source
# File lib/symbiont/service_objects.rb, line 53 def call(operation, data) @response = @client.call(operation, data) response.to_xml end
client_properties()
click to toggle source
# File lib/symbiont/service_objects.rb, line 58 def client_properties properties = { log: false, ssl_version: :SSLv3, ssl_verify_mode: :none } [ :has_wsdl, :has_proxy, :has_basic_auth, :has_digest_auth, :has_encoding, :has_soap_header, :has_open_timeout, :has_read_timeout, :has_log_level, :has_ssl_version, :has_ssl_verification, ].each do |sym| properties = properties.merge(send sym) if self.respond_to? sym end properties end
method_missing(*args)
click to toggle source
# File lib/symbiont/service_objects.rb, line 46 def method_missing(*args) operation = args.shift message = args.shift type = message.is_a?(String) ? :xml : :message call(operation, type => message) end