Class: SOAP::RPC::Driver
Instance Attribute Summary collapse
- 
  
    
      #options  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute options.
 - 
  
    
      #proxy  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute proxy.
 - 
  
    
      #soapaction  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute soapaction.
 
Instance Method Summary collapse
- #__attr_proxy(symbol, assignable = false) ⇒ Object
 - #add_document_method(name, soapaction, req_qname, res_qname) ⇒ Object
 - #add_document_operation(soapaction, name, param_def, opt = {}) ⇒ Object
 - #add_rpc_method(name, *params) ⇒ Object (also: #add_method)
 - #add_rpc_method_as(name, name_as, *params) ⇒ Object (also: #add_method_as)
 - #add_rpc_method_with_soapaction(name, soapaction, *params) ⇒ Object (also: #add_method_with_soapaction)
 - #add_rpc_method_with_soapaction_as(name, name_as, soapaction, *params) ⇒ Object (also: #add_method_with_soapaction_as)
 - #add_rpc_operation(qname, soapaction, name, param_def, opt = {}) ⇒ Object
 - #call(name, *params) ⇒ Object
 - #httpproxy ⇒ Object
 - #httpproxy=(httpproxy) ⇒ Object
 - 
  
    
      #initialize(endpoint_url, namespace = nil, soapaction = nil)  ⇒ Driver 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Driver.
 - #inspect ⇒ Object
 - #invoke(headers, body) ⇒ Object
 - #loadproperty(propertyname) ⇒ Object
 - #mandatorycharset ⇒ Object
 - #mandatorycharset=(mandatorycharset) ⇒ Object
 - #wiredump_dev ⇒ Object
 - #wiredump_dev=(wiredump_dev) ⇒ Object
 - #wiredump_file_base ⇒ Object
 - #wiredump_file_base=(wiredump_file_base) ⇒ Object
 
Constructor Details
#initialize(endpoint_url, namespace = nil, soapaction = nil) ⇒ Driver
Returns a new instance of Driver.
      108 109 110 111 112 113 114  | 
    
      # File 'lib/soap/rpc/driver.rb', line 108 def initialize(endpoint_url, namespace = nil, soapaction = nil) @namespace = namespace @soapaction = soapaction @options = @wiredump_file_base = nil @proxy = Proxy.new(endpoint_url, @soapaction, @options) end  | 
  
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
      69 70 71  | 
    
      # File 'lib/soap/rpc/driver.rb', line 69 def @options end  | 
  
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
      68 69 70  | 
    
      # File 'lib/soap/rpc/driver.rb', line 68 def proxy @proxy end  | 
  
#soapaction ⇒ Object
Returns the value of attribute soapaction.
      70 71 72  | 
    
      # File 'lib/soap/rpc/driver.rb', line 70 def soapaction @soapaction end  | 
  
Instance Method Details
#__attr_proxy(symbol, assignable = false) ⇒ Object
      27 28 29 30 31 32 33 34 35 36 37 38  | 
    
      # File 'lib/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  | 
  
#add_document_method(name, soapaction, req_qname, res_qname) ⇒ Object
      147 148 149 150 151  | 
    
      # File 'lib/soap/rpc/driver.rb', line 147 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  | 
  
#add_document_operation(soapaction, name, param_def, opt = {}) ⇒ Object
      158 159 160 161  | 
    
      # File 'lib/soap/rpc/driver.rb', line 158 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  | 
  
#add_rpc_method(name, *params) ⇒ Object Also known as: add_method
      122 123 124  | 
    
      # File 'lib/soap/rpc/driver.rb', line 122 def add_rpc_method(name, *params) add_rpc_method_with_soapaction_as(name, name, @soapaction, *params) end  | 
  
#add_rpc_method_as(name, name_as, *params) ⇒ Object Also known as: add_method_as
      126 127 128  | 
    
      # File 'lib/soap/rpc/driver.rb', line 126 def add_rpc_method_as(name, name_as, *params) add_rpc_method_with_soapaction_as(name, name_as, @soapaction, *params) end  | 
  
#add_rpc_method_with_soapaction(name, soapaction, *params) ⇒ Object Also known as: add_method_with_soapaction
      130 131 132  | 
    
      # File 'lib/soap/rpc/driver.rb', line 130 def add_rpc_method_with_soapaction(name, soapaction, *params) add_rpc_method_with_soapaction_as(name, name, soapaction, *params) end  | 
  
#add_rpc_method_with_soapaction_as(name, name_as, soapaction, *params) ⇒ Object Also known as: add_method_with_soapaction_as
      134 135 136 137 138 139  | 
    
      # File 'lib/soap/rpc/driver.rb', line 134 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  | 
  
#add_rpc_operation(qname, soapaction, name, param_def, opt = {}) ⇒ Object
      153 154 155 156  | 
    
      # File 'lib/soap/rpc/driver.rb', line 153 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  | 
  
#call(name, *params) ⇒ Object
      176 177 178 179  | 
    
      # File 'lib/soap/rpc/driver.rb', line 176 def call(name, *params) set_wiredump_file_base(name) @proxy.call(name, *params) end  | 
  
#httpproxy ⇒ Object
      76 77 78  | 
    
      # File 'lib/soap/rpc/driver.rb', line 76 def httpproxy ["protocol.http.proxy"] end  | 
  
#httpproxy=(httpproxy) ⇒ Object
      80 81 82  | 
    
      # File 'lib/soap/rpc/driver.rb', line 80 def httpproxy=(httpproxy) ["protocol.http.proxy"] = httpproxy end  | 
  
#inspect ⇒ Object
      72 73 74  | 
    
      # File 'lib/soap/rpc/driver.rb', line 72 def inspect "#<#{self.class}:#{@proxy.inspect}>" end  | 
  
#invoke(headers, body) ⇒ Object
      163 164 165 166 167 168 169 170 171 172 173 174  | 
    
      # File 'lib/soap/rpc/driver.rb', line 163 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  | 
  
#loadproperty(propertyname) ⇒ Object
      116 117 118 119 120  | 
    
      # File 'lib/soap/rpc/driver.rb', line 116 def loadproperty(propertyname) unless .loadproperty(propertyname) raise LoadError.new("No such property to load -- #{propertyname}") end end  | 
  
#mandatorycharset ⇒ Object
      92 93 94  | 
    
      # File 'lib/soap/rpc/driver.rb', line 92 def mandatorycharset ["protocol.mandatorycharset"] end  | 
  
#mandatorycharset=(mandatorycharset) ⇒ Object
      96 97 98  | 
    
      # File 'lib/soap/rpc/driver.rb', line 96 def mandatorycharset=(mandatorycharset) ["protocol.mandatorycharset"] = mandatorycharset end  | 
  
#wiredump_dev ⇒ Object
      84 85 86  | 
    
      # File 'lib/soap/rpc/driver.rb', line 84 def wiredump_dev ["protocol.http.wiredump_dev"] end  | 
  
#wiredump_dev=(wiredump_dev) ⇒ Object
      88 89 90  | 
    
      # File 'lib/soap/rpc/driver.rb', line 88 def wiredump_dev=(wiredump_dev) ["protocol.http.wiredump_dev"] = wiredump_dev end  | 
  
#wiredump_file_base ⇒ Object
      100 101 102  | 
    
      # File 'lib/soap/rpc/driver.rb', line 100 def wiredump_file_base ["protocol.wiredump_file_base"] end  | 
  
#wiredump_file_base=(wiredump_file_base) ⇒ Object
      104 105 106  | 
    
      # File 'lib/soap/rpc/driver.rb', line 104 def wiredump_file_base=(wiredump_file_base) ["protocol.wiredump_file_base"] = wiredump_file_base end  |