Parent

Included Modules

Files

Class Index [+]

Quicksearch

WSDL::SOAP::ClientSkeltonCreator

Attributes

definitions[R]

Public Class Methods

new(definitions, name_creator, modulepath = nil) click to toggle source
    # File lib/wsdl/soap/clientSkeltonCreator.rb, line 22
22:   def initialize(definitions, name_creator, modulepath = nil)
23:     @definitions = definitions
24:     @name_creator = name_creator
25:     @modulepath = modulepath
26:   end

Public Instance Methods

dump(service_name) click to toggle source
    # File lib/wsdl/soap/clientSkeltonCreator.rb, line 28
28:   def dump(service_name)
29:     services = @definitions.service(service_name)
30:     unless services
31:       raise RuntimeError.new("service not defined: #{service_name}")
32:     end
33:     result = ""
34:     if @modulepath
35:       result << "\n"
36:       result << @modulepath.collect { |ele| "module #{ele}" }.join("; ")
37:       result << "\n\n"
38:     end
39:     services.ports.each do |port|
40:       result << dump_porttype(port.porttype)
41:       result << "\n"
42:     end
43:     if @modulepath
44:       result << "\n\n"
45:       result << @modulepath.collect { |ele| "end" }.join("; ")
46:       result << "\n"
47:     end
48:     result
49:   end

Private Instance Methods

dump_input_init(input) click to toggle source
    # File lib/wsdl/soap/clientSkeltonCreator.rb, line 80
80:   def dump_input_init(input)
81:     result = input.find_message.parts.collect { |part|
82:       safevarname(part.name)
83:     }.join(" = ")
84:     if result.empty?
85:       ""
86:     else
87:       result << " = nil"
88:     end
89:     result
90:   end
dump_operation(operation) click to toggle source
    # File lib/wsdl/soap/clientSkeltonCreator.rb, line 74
74:   def dump_operation(operation)
75:     name = operation.name
76:     input = operation.input
77:     "puts obj.#{ safemethodname(name) }#{ dump_inputparam(input) }"
78:   end
dump_porttype(porttype) click to toggle source
    # File lib/wsdl/soap/clientSkeltonCreator.rb, line 53
53:   def dump_porttype(porttype)
54:     drv_name = mapped_class_basename(porttype.name, @modulepath)
55: 
56:     result = ""
57:     result << endpoint_url = ARGV.shiftobj = #{ drv_name }.new(endpoint_url)# run ruby with -d to see SOAP wiredumps.obj.wiredump_dev = STDERR if $DEBUG
58:     element_definitions = @definitions.collect_elements
59:     porttype.operations.each do |operation|
60:       result << dump_method_signature(operation, element_definitions)
61:       result << dump_input_init(operation.input) << "\n"
62:       result << dump_operation(operation) << "\n\n"
63:     end
64:     result
65:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.