Class: SOAP::MultiService::WSDL2Ruby

Inherits:
Object
  • Object
show all
Defined in:
lib/soapex/wsdl2ruby.rb

Constant Summary collapse

Options =
[:classdef, :mapping_registry, :driver, :client_skelton, :servant_skelton,
:standalone_server_stub, :cgi_stub]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(basedir, force = false, logger = nil) ⇒ WSDL2Ruby

Returns a new instance of WSDL2Ruby.



29
30
31
32
33
# File 'lib/soapex/wsdl2ruby.rb', line 29

def initialize(basedir, force=false, logger=nil)
  @basedir = basedir
  @force = force
  @logger ||= Logger.new(STDERR)
end

Instance Attribute Details

#basedirObject (readonly)

Returns the value of attribute basedir.



24
25
26
# File 'lib/soapex/wsdl2ruby.rb', line 24

def basedir
  @basedir
end

#loggerObject (readonly)

Returns the value of attribute logger.



24
25
26
# File 'lib/soapex/wsdl2ruby.rb', line 24

def logger
  @logger
end

#optionsObject (readonly)

Returns the value of attribute options.



24
25
26
# File 'lib/soapex/wsdl2ruby.rb', line 24

def options
  @options
end

Instance Method Details

#run(location, options = {}) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/soapex/wsdl2ruby.rb', line 35

def run(location, options={})
  @modulepath = (options[:modulepath] || "")
  @wsdl = import(location)
  @servicename = @wsdl.services[0].name.name
  Options.each do |optname|
    if options.key?(optname)
      servicename = (options[optname] || @servicename)
      method("create_#{optname.to_s}".to_sym).call(servicename)
    end
  end
end