virtuozzo 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/CHANGELOG.rdoc +86 -0
  2. data/Manifest +42 -0
  3. data/README.rdoc +52 -0
  4. data/Rakefile +20 -0
  5. data/lib/virtuozzo.rb +18 -0
  6. data/lib/virtuozzo/constants.rb +7 -0
  7. data/lib/virtuozzo/soap.rb +220 -0
  8. data/lib/virtuozzo/soap/drivers/device.rb +141 -0
  9. data/lib/virtuozzo/soap/drivers/environment.rb +301 -0
  10. data/lib/virtuozzo/soap/drivers/network.rb +101 -0
  11. data/lib/virtuozzo/soap/drivers/process.rb +69 -0
  12. data/lib/virtuozzo/soap/drivers/process_info.rb +61 -0
  13. data/lib/virtuozzo/soap/drivers/relocator.rb +101 -0
  14. data/lib/virtuozzo/soap/drivers/session.rb +149 -0
  15. data/lib/virtuozzo/soap/drivers/support.rb +109 -0
  16. data/lib/virtuozzo/soap/drivers/template.rb +117 -0
  17. data/lib/virtuozzo/soap/drivers/up2date.rb +93 -0
  18. data/lib/virtuozzo/soap/header_handler.rb +91 -0
  19. data/lib/virtuozzo/soap/mapping_registries/device.rb +3658 -0
  20. data/lib/virtuozzo/soap/mapping_registries/environment.rb +4466 -0
  21. data/lib/virtuozzo/soap/mapping_registries/network.rb +3121 -0
  22. data/lib/virtuozzo/soap/mapping_registries/process.rb +3322 -0
  23. data/lib/virtuozzo/soap/mapping_registries/process_info.rb +2990 -0
  24. data/lib/virtuozzo/soap/mapping_registries/relocator.rb +3661 -0
  25. data/lib/virtuozzo/soap/mapping_registries/session.rb +3044 -0
  26. data/lib/virtuozzo/soap/mapping_registries/support.rb +3237 -0
  27. data/lib/virtuozzo/soap/mapping_registries/template.rb +3757 -0
  28. data/lib/virtuozzo/soap/mapping_registries/up2date.rb +3317 -0
  29. data/lib/virtuozzo/soap/types/device.rb +3145 -0
  30. data/lib/virtuozzo/soap/types/environment.rb +3743 -0
  31. data/lib/virtuozzo/soap/types/network.rb +2404 -0
  32. data/lib/virtuozzo/soap/types/process.rb +2713 -0
  33. data/lib/virtuozzo/soap/types/process_info.rb +2328 -0
  34. data/lib/virtuozzo/soap/types/relocator.rb +2920 -0
  35. data/lib/virtuozzo/soap/types/session.rb +2455 -0
  36. data/lib/virtuozzo/soap/types/support.rb +2711 -0
  37. data/lib/virtuozzo/soap/types/template.rb +3086 -0
  38. data/lib/virtuozzo/soap/types/up2date.rb +2672 -0
  39. data/script/console +10 -0
  40. data/script/github-gem-test +15 -0
  41. data/tasks/yard.rake +12 -0
  42. data/virtuozzo.gemspec +37 -0
  43. metadata +154 -0
@@ -0,0 +1,69 @@
1
+ require 'virtuozzo/soap/types/process'
2
+ require 'virtuozzo/soap/mapping_registries/process'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo # :nodoc:
6
+ module SOAP # :nodoc:
7
+ module Drivers # :nodoc:
8
+ # = Process
9
+ #
10
+ class Process < ::SOAP::RPC::Driver
11
+ DefaultEndpointUrl = "https://localhost:4646"
12
+
13
+ Methods = [
14
+ [ nil,
15
+ "execute",
16
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/processm", "execute"]],
17
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/processm", "executeResponse"]] ],
18
+ { :request_style => :document, :request_use => :literal,
19
+ :response_style => :document, :response_use => :literal,
20
+ :faults => {} }
21
+ ],
22
+ [ nil,
23
+ "kill",
24
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzaprocessm", "kill"]],
25
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzaprocessm", "killResponse"]] ],
26
+ { :request_style => :document, :request_use => :literal,
27
+ :response_style => :document, :response_use => :literal,
28
+ :faults => {} }
29
+ ]
30
+ ]
31
+
32
+ def initialize(endpoint_url = nil)
33
+ endpoint_url ||= DefaultEndpointUrl
34
+ super(endpoint_url, nil)
35
+ self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Process::EncodedRegistry
36
+ self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Process::LiteralRegistry
37
+ init_methods
38
+ end
39
+
40
+ private
41
+
42
+ def init_methods
43
+ Methods.each do |definitions|
44
+ opt = definitions.last
45
+
46
+ # set options to use default namespace instead of using n[#]
47
+ opt.merge!({
48
+ :use_default_namespace => true
49
+ })
50
+
51
+ if opt[:request_style] == :document
52
+ add_document_operation(*definitions)
53
+ else
54
+ add_rpc_operation(*definitions)
55
+ qname = definitions[0]
56
+ name = definitions[2]
57
+ if qname.name != name and qname.name.capitalize == name.capitalize
58
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
59
+ __send__(name, *arg)
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,61 @@
1
+ require 'virtuozzo/soap/types/process_info'
2
+ require 'virtuozzo/soap/mapping_registries/process_info'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo # :nodoc:
6
+ module SOAP # :nodoc:
7
+ module Drivers # :nodoc:
8
+ # = ProcessInfo
9
+ #
10
+ class ProcessInfo < ::SOAP::RPC::Driver
11
+ DefaultEndpointUrl = "https://localhost:4646"
12
+
13
+ Methods = [
14
+ [ nil,
15
+ "get",
16
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzaproc_info", "get"]],
17
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzaproc_info", "getResponse"]] ],
18
+ { :request_style => :document, :request_use => :literal,
19
+ :response_style => :document, :response_use => :literal,
20
+ :faults => {} }
21
+ ]
22
+ ]
23
+
24
+ def initialize(endpoint_url = nil)
25
+ endpoint_url ||= DefaultEndpointUrl
26
+ super(endpoint_url, nil)
27
+ self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::ProcessInfo::EncodedRegistry
28
+ self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::ProcessInfo::LiteralRegistry
29
+ init_methods
30
+ end
31
+
32
+ private
33
+
34
+ def init_methods
35
+ Methods.each do |definitions|
36
+ opt = definitions.last
37
+
38
+ # set options to use default namespace instead of using n[#]
39
+ opt.merge!({
40
+ :use_default_namespace => true
41
+ })
42
+
43
+ if opt[:request_style] == :document
44
+ add_document_operation(*definitions)
45
+ else
46
+ add_rpc_operation(*definitions)
47
+ qname = definitions[0]
48
+ name = definitions[2]
49
+ if qname.name != name and qname.name.capitalize == name.capitalize
50
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
51
+ __send__(name, *arg)
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,101 @@
1
+ require 'virtuozzo/soap/types/relocator'
2
+ require 'virtuozzo/soap/mapping_registries/relocator'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo # :nodoc:
6
+ module SOAP # :nodoc:
7
+ module Drivers # :nodoc:
8
+ # = Relocator
9
+ #
10
+ class Relocator < ::SOAP::RPC::Driver
11
+ DefaultEndpointUrl = "https://localhost:4646"
12
+
13
+ Methods = [
14
+ [ nil,
15
+ "migrate_p2v",
16
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "migrate_p2v"]],
17
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "migrate_p2vResponse"]] ],
18
+ { :request_style => :document, :request_use => :literal,
19
+ :response_style => :document, :response_use => :literal,
20
+ :faults => {} }
21
+ ],
22
+ [ nil,
23
+ "calc_env_config",
24
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "calc_env_config"]],
25
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "calc_env_configResponse"]] ],
26
+ { :request_style => :document, :request_use => :literal,
27
+ :response_style => :document, :response_use => :literal,
28
+ :faults => {} }
29
+ ],
30
+ [ nil,
31
+ "migrate_v2p",
32
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "migrate_v2p"]],
33
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "migrate_v2pResponse"]] ],
34
+ { :request_style => :document, :request_use => :literal,
35
+ :response_style => :document, :response_use => :literal,
36
+ :faults => {} }
37
+ ],
38
+ [ nil,
39
+ "migrate_v2v",
40
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "migrate_v2v"]],
41
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "migrate_v2vResponse"]] ],
42
+ { :request_style => :document, :request_use => :literal,
43
+ :response_style => :document, :response_use => :literal,
44
+ :faults => {} }
45
+ ],
46
+ [ nil,
47
+ "move",
48
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "move"]],
49
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "moveResponse"]] ],
50
+ { :request_style => :document, :request_use => :literal,
51
+ :response_style => :document, :response_use => :literal,
52
+ :faults => {} }
53
+ ],
54
+ [ nil,
55
+ "clone",
56
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "clone"]],
57
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/relocator", "cloneResponse"]] ],
58
+ { :request_style => :document, :request_use => :literal,
59
+ :response_style => :document, :response_use => :literal,
60
+ :faults => {} }
61
+ ]
62
+ ]
63
+
64
+ def initialize(endpoint_url = nil)
65
+ endpoint_url ||= DefaultEndpointUrl
66
+ super(endpoint_url, nil)
67
+ self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Relocator::EncodedRegistry
68
+ self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Relocator::LiteralRegistry
69
+ init_methods
70
+ end
71
+
72
+ private
73
+
74
+ def init_methods
75
+ Methods.each do |definitions|
76
+ opt = definitions.last
77
+
78
+ # set options to use default namespace instead of using n[#]
79
+ opt.merge!({
80
+ :use_default_namespace => true
81
+ })
82
+
83
+ if opt[:request_style] == :document
84
+ add_document_operation(*definitions)
85
+ else
86
+ add_rpc_operation(*definitions)
87
+ qname = definitions[0]
88
+ name = definitions[2]
89
+ if qname.name != name and qname.name.capitalize == name.capitalize
90
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
91
+ __send__(name, *arg)
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,149 @@
1
+ require 'virtuozzo/soap/types/session'
2
+ require 'virtuozzo/soap/mapping_registries/session'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo # :nodoc:
6
+ module SOAP # :nodoc:
7
+ module Drivers # :nodoc:
8
+ # = Session
9
+ #
10
+ class Session < ::SOAP::RPC::Driver
11
+ DefaultEndpointUrl = "https://localhost:4646"
12
+
13
+ Methods = [
14
+ [ nil,
15
+ "duplicate_session",
16
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "duplicate_session"]],
17
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "duplicate_sessionResponse"]] ],
18
+ { :request_style => :document, :request_use => :literal,
19
+ :response_style => :document, :response_use => :literal,
20
+ :faults => {} }
21
+ ],
22
+ [ nil,
23
+ "login",
24
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "login"]],
25
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "loginResponse"]] ],
26
+ { :request_style => :document, :request_use => :literal,
27
+ :response_style => :document, :response_use => :literal,
28
+ :faults => {} }
29
+ ],
30
+ [ nil,
31
+ "login_as",
32
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "login_as"]],
33
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "login_asResponse"]] ],
34
+ { :request_style => :document, :request_use => :literal,
35
+ :response_style => :document, :response_use => :literal,
36
+ :faults => {} }
37
+ ],
38
+ [ nil,
39
+ "logout",
40
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "logout"]],
41
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "logoutResponse"]] ],
42
+ { :request_style => :document, :request_use => :literal,
43
+ :response_style => :document, :response_use => :literal,
44
+ :faults => {} }
45
+ ],
46
+ [ nil,
47
+ "verify",
48
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "verify"]],
49
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "verifyResponse"]] ],
50
+ { :request_style => :document, :request_use => :literal,
51
+ :response_style => :document, :response_use => :literal,
52
+ :faults => {} }
53
+ ],
54
+ [ nil,
55
+ "put",
56
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "put"]],
57
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "putResponse"]] ],
58
+ { :request_style => :document, :request_use => :literal,
59
+ :response_style => :document, :response_use => :literal,
60
+ :faults => {} }
61
+ ],
62
+ [ nil,
63
+ "get",
64
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "get"]],
65
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "getResponse"]] ],
66
+ { :request_style => :document, :request_use => :literal,
67
+ :response_style => :document, :response_use => :literal,
68
+ :faults => {} }
69
+ ],
70
+ [ nil,
71
+ "list_sessions",
72
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "list_sessions"]],
73
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "list_sessionsResponse"]] ],
74
+ { :request_style => :document, :request_use => :literal,
75
+ :response_style => :document, :response_use => :literal,
76
+ :faults => {} }
77
+ ],
78
+ [ nil,
79
+ "register_client",
80
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "register_client"]],
81
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "register_clientResponse"]] ],
82
+ { :request_style => :document, :request_use => :literal,
83
+ :response_style => :document, :response_use => :literal,
84
+ :faults => {} }
85
+ ],
86
+ [ nil,
87
+ "count_registered",
88
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "count_registered"]],
89
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "count_registeredResponse"]] ],
90
+ { :request_style => :document, :request_use => :literal,
91
+ :response_style => :document, :response_use => :literal,
92
+ :faults => {} }
93
+ ],
94
+ [ nil,
95
+ "update_session",
96
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "update_session"]],
97
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "update_sessionResponse"]] ],
98
+ { :request_style => :document, :request_use => :literal,
99
+ :response_style => :document, :response_use => :literal,
100
+ :faults => {} }
101
+ ],
102
+ [ nil,
103
+ "get_session",
104
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "get_session"]],
105
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/sessionm", "get_sessionResponse"]] ],
106
+ { :request_style => :document, :request_use => :literal,
107
+ :response_style => :document, :response_use => :literal,
108
+ :faults => {} }
109
+ ]
110
+ ]
111
+
112
+ def initialize(endpoint_url = nil)
113
+ endpoint_url ||= DefaultEndpointUrl
114
+ super(endpoint_url, nil)
115
+ self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Session::EncodedRegistry
116
+ self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Session::LiteralRegistry
117
+ init_methods
118
+ end
119
+
120
+ private
121
+
122
+ def init_methods
123
+ Methods.each do |definitions|
124
+ opt = definitions.last
125
+
126
+ # set options to use default namespace instead of using n[#]
127
+ opt.merge!({
128
+ :use_default_namespace => true
129
+ })
130
+
131
+ if opt[:request_style] == :document
132
+ add_document_operation(*definitions)
133
+ else
134
+ add_rpc_operation(*definitions)
135
+ qname = definitions[0]
136
+ name = definitions[2]
137
+ if qname.name != name and qname.name.capitalize == name.capitalize
138
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
139
+ __send__(name, *arg)
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
145
+ end
146
+
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,109 @@
1
+ require 'virtuozzo/soap/types/support'
2
+ require 'virtuozzo/soap/mapping_registries/support'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo # :nodoc:
6
+ module SOAP # :nodoc:
7
+ module Drivers # :nodoc:
8
+ # = Support
9
+ #
10
+ class Support < ::SOAP::RPC::Driver
11
+ DefaultEndpointUrl = "https://localhost:4646"
12
+
13
+ Methods = [
14
+ [ nil,
15
+ "start_channel",
16
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "start_channel"]],
17
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "start_channelResponse"]] ],
18
+ { :request_style => :document, :request_use => :literal,
19
+ :response_style => :document, :response_use => :literal,
20
+ :faults => {} }
21
+ ],
22
+ [ nil,
23
+ "stop_channel",
24
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "stop_channel"]],
25
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "stop_channelResponse"]] ],
26
+ { :request_style => :document, :request_use => :literal,
27
+ :response_style => :document, :response_use => :literal,
28
+ :faults => {} }
29
+ ],
30
+ [ nil,
31
+ "get_channel_status",
32
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_channel_status"]],
33
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_channel_statusResponse"]] ],
34
+ { :request_style => :document, :request_use => :literal,
35
+ :response_style => :document, :response_use => :literal,
36
+ :faults => {} }
37
+ ],
38
+ [ nil,
39
+ "get_key_status",
40
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_key_status"]],
41
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_key_statusResponse"]] ],
42
+ { :request_style => :document, :request_use => :literal,
43
+ :response_style => :document, :response_use => :literal,
44
+ :faults => {} }
45
+ ],
46
+ [ nil,
47
+ "set_key",
48
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "set_key"]],
49
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "set_keyResponse"]] ],
50
+ { :request_style => :document, :request_use => :literal,
51
+ :response_style => :document, :response_use => :literal,
52
+ :faults => {} }
53
+ ],
54
+ [ nil,
55
+ "remove_key",
56
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "remove_key"]],
57
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "remove_keyResponse"]] ],
58
+ { :request_style => :document, :request_use => :literal,
59
+ :response_style => :document, :response_use => :literal,
60
+ :faults => {} }
61
+ ],
62
+ [ nil,
63
+ "problem_report",
64
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "problem_report"]],
65
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "problem_reportResponse"]] ],
66
+ { :request_style => :document, :request_use => :literal,
67
+ :response_style => :document, :response_use => :literal,
68
+ :faults => {} }
69
+ ]
70
+ ]
71
+
72
+ def initialize(endpoint_url = nil)
73
+ endpoint_url ||= DefaultEndpointUrl
74
+ super(endpoint_url, nil)
75
+ self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Support::EncodedRegistry
76
+ self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Support::LiteralRegistry
77
+ init_methods
78
+ end
79
+
80
+ private
81
+
82
+ def init_methods
83
+ Methods.each do |definitions|
84
+ opt = definitions.last
85
+
86
+ # set options to use default namespace instead of using n[#]
87
+ opt.merge!({
88
+ :use_default_namespace => true
89
+ })
90
+
91
+ if opt[:request_style] == :document
92
+ add_document_operation(*definitions)
93
+ else
94
+ add_rpc_operation(*definitions)
95
+ qname = definitions[0]
96
+ name = definitions[2]
97
+ if qname.name != name and qname.name.capitalize == name.capitalize
98
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
99
+ __send__(name, *arg)
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+
107
+ end
108
+ end
109
+ end