Class: SOAP::WSDLDriverFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/soap/wsdlDriver.rb

Defined Under Namespace

Classes: FactoryError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wsdl) ⇒ WSDLDriverFactory

Returns a new instance of WSDLDriverFactory.


27
28
29
30
# File 'lib/soap/wsdlDriver.rb', line 27

def initialize(wsdl)
  @wsdl = import(wsdl)
  @methoddefcreator = WSDL::SOAP::MethodDefCreator.new(@wsdl, nil)
end

Instance Attribute Details

#wsdlObject (readonly)

Returns the value of attribute wsdl


25
26
27
# File 'lib/soap/wsdlDriver.rb', line 25

def wsdl
  @wsdl
end

Instance Method Details

#create_driver(servicename = nil, portname = nil) ⇒ Object Also known as: createDriver

deprecated old interface


45
46
47
48
49
# File 'lib/soap/wsdlDriver.rb', line 45

def create_driver(servicename = nil, portname = nil)
  warn("WSDLDriverFactory#create_driver is deprecated.  Use create_rpc_driver instead.")
  port = find_port(servicename, portname)
  WSDLDriver.new(@wsdl, port, nil)
end

#create_rpc_driver(servicename = nil, portname = nil) ⇒ Object


36
37
38
39
40
41
42
# File 'lib/soap/wsdlDriver.rb', line 36

def create_rpc_driver(servicename = nil, portname = nil)
  port = find_port(servicename, portname)
  drv = SOAP::RPC::Driver.new(port.soap_address.location)
  init_driver(drv, port)
  add_operation(drv, port)
  drv
end

#inspectObject


32
33
34
# File 'lib/soap/wsdlDriver.rb', line 32

def inspect
  "#<#{self.class}:#{@wsdl.name}>"
end