Class | SOAP::RPC::Driver |
In: |
soap/rpc/driver.rb
|
Parent: | Object |
options | [R] | |
proxy | [R] | |
soapaction | [RW] |
# File soap/rpc/driver.rb, line 27 def __attr_proxy(symbol, assignable = false) name = symbol.to_s define_method(name) { @proxy.__send__(name) } if assignable aname = name + '=' define_method(aname) { |rhs| @proxy.__send__(aname, rhs) } end end
# File soap/rpc/driver.rb, line 40 def __attr_proxy(symbol, assignable = false) name = symbol.to_s module_eval "def \#{name}\n@proxy.\#{name}\nend\n" if assignable module_eval "def \#{name}=(value)\n@proxy.\#{name} = value\nend\n" end end
# File soap/rpc/driver.rb, line 110 def initialize(endpoint_url, namespace = nil, soapaction = nil) @namespace = namespace @soapaction = soapaction @options = setup_options @wiredump_file_base = nil @proxy = Proxy.new(endpoint_url, @soapaction, @options) end
# File soap/rpc/driver.rb, line 149 def add_document_method(name, soapaction, req_qname, res_qname) param_def = SOAPMethod.create_doc_param_def(req_qname, res_qname) @proxy.add_document_method(soapaction, name, param_def) add_document_method_interface(name, param_def) end
# File soap/rpc/driver.rb, line 160 def add_document_operation(soapaction, name, param_def, opt = {}) @proxy.add_document_operation(soapaction, name, param_def, opt) add_document_method_interface(name, param_def) end
Alias for add_rpc_method_with_soapaction_as
# File soap/rpc/driver.rb, line 124 def add_rpc_method(name, *params) add_rpc_method_with_soapaction_as(name, name, @soapaction, *params) end
# File soap/rpc/driver.rb, line 128 def add_rpc_method_as(name, name_as, *params) add_rpc_method_with_soapaction_as(name, name_as, @soapaction, *params) end
# File soap/rpc/driver.rb, line 132 def add_rpc_method_with_soapaction(name, soapaction, *params) add_rpc_method_with_soapaction_as(name, name, soapaction, *params) end
# File soap/rpc/driver.rb, line 136 def add_rpc_method_with_soapaction_as(name, name_as, soapaction, *params) param_def = SOAPMethod.create_rpc_param_def(params) qname = XSD::QName.new(@namespace, name_as) @proxy.add_rpc_method(qname, soapaction, name, param_def) add_rpc_method_interface(name, param_def) end
# File soap/rpc/driver.rb, line 155 def add_rpc_operation(qname, soapaction, name, param_def, opt = {}) @proxy.add_rpc_operation(qname, soapaction, name, param_def, opt) add_rpc_method_interface(name, param_def) end
# File soap/rpc/driver.rb, line 178 def call(name, *params) set_wiredump_file_base(name) @proxy.call(name, *params) end
# File soap/rpc/driver.rb, line 82 def httpproxy=(httpproxy) options["protocol.http.proxy"] = httpproxy end
# File soap/rpc/driver.rb, line 165 def invoke(headers, body) if headers and !headers.is_a?(SOAPHeader) headers = create_header(headers) end set_wiredump_file_base(body.elename.name) env = @proxy.invoke(headers, body) if env.nil? return nil, nil else return env.header, env.body end end
# File soap/rpc/driver.rb, line 118 def loadproperty(propertyname) unless options.loadproperty(propertyname) raise LoadError.new("No such property to load -- #{propertyname}") end end
# File soap/rpc/driver.rb, line 98 def mandatorycharset=(mandatorycharset) options["protocol.mandatorycharset"] = mandatorycharset end
# File soap/rpc/driver.rb, line 90 def wiredump_dev=(wiredump_dev) options["protocol.http.wiredump_dev"] = wiredump_dev end
# File soap/rpc/driver.rb, line 102 def wiredump_file_base options["protocol.wiredump_file_base"] end