rubyjedi-soap4r 1.5.8.01 → 1.5.8.20100616125722
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/wsdl2ruby.rb +1 -0
- data/bin/xsd2ruby.rb +1 -1
- data/lib/soap/baseData.rb +1 -1
- data/lib/soap/element.rb +0 -2
- data/lib/soap/generator.rb +1 -2
- data/lib/soap/mapping/encodedregistry.rb +1 -0
- data/lib/soap/mapping/factory.rb +2 -2
- data/lib/soap/mapping/mapping.rb +3 -4
- data/lib/soap/mapping/registry.rb +0 -15
- data/lib/soap/mapping/rubytypeFactory.rb +0 -1
- data/lib/soap/mapping/wsdlencodedregistry.rb +1 -1
- data/lib/soap/mimemessage.rb +1 -0
- data/lib/soap/nestedexception.rb +1 -1
- data/lib/soap/netHttpClient.rb +4 -4
- data/lib/soap/ns.rb +4 -0
- data/lib/soap/property.rb +21 -15
- data/lib/soap/rpc/element.rb +1 -1
- data/lib/soap/rpc/standaloneServer.rb +1 -1
- data/lib/soap/soap.rb +4 -2
- data/lib/soap/streamHandler.rb +1 -1
- data/lib/soap/version.rb +8 -0
- data/lib/soap/wsdlDriver.rb +2 -2
- data/lib/wsdl/parser.rb +4 -4
- data/lib/wsdl/soap/classDefCreatorSupport.rb +1 -1
- data/lib/wsdl/soap/clientSkeltonCreator.rb +4 -2
- data/lib/wsdl/soap/driverCreator.rb +4 -2
- data/lib/wsdl/soap/methodDefCreator.rb +1 -1
- data/lib/wsdl/soap/servantSkeltonCreator.rb +4 -2
- data/lib/wsdl/soap/wsdl2ruby.rb +1 -1
- data/lib/wsdl/xmlSchema/parser.rb +4 -4
- data/lib/wsdl/xmlSchema/xsd2ruby.rb +1 -1
- data/lib/xsd/charset.rb +4 -3
- data/lib/xsd/codegen/gensupport.rb +8 -5
- data/lib/xsd/datatypes.rb +6 -6
- data/lib/xsd/ns.rb +1 -1
- data/lib/xsd/qname.rb +2 -2
- data/lib/xsd/xmlparser.rb +11 -17
- data/lib/xsd/xmlparser/libxmlparser.rb +6 -10
- data/test/helper.rb +6 -0
- data/test/soap/asp.net/test_aspdotnet.rb +3 -3
- data/test/soap/auth/test_basic.rb +2 -2
- data/test/soap/auth/test_digest.rb +2 -2
- data/test/soap/calc/server.cgi +2 -0
- data/test/soap/calc/test_calc.rb +3 -2
- data/test/soap/calc/test_calc2.rb +3 -2
- data/test/soap/calc/test_calc_cgi.rb +1 -1
- data/test/soap/case/test_mapping.rb +2 -2
- data/test/soap/fault/test_customfault.rb +1 -1
- data/test/soap/fault/test_fault.rb +1 -1
- data/test/soap/fault/test_soaparray.rb +1 -1
- data/test/soap/filter/test_filter.rb +1 -1
- data/test/soap/header/server.cgi +1 -0
- data/test/soap/header/test_authheader.rb +1 -1
- data/test/soap/header/test_authheader_cgi.rb +1 -1
- data/test/soap/header/test_simplehandler.rb +1 -1
- data/test/soap/helloworld/test_helloworld.rb +3 -2
- data/test/soap/literalArrayMapping/test_definedarray.rb +2 -2
- data/test/soap/marshal/marshaltestlib.rb +5 -2
- data/test/soap/marshal/test_digraph.rb +1 -1
- data/test/soap/marshal/test_marshal.rb +3 -2
- data/test/soap/marshal/test_struct.rb +1 -1
- data/test/soap/ssl/sslsvr.rb +1 -0
- data/test/soap/ssl/test_ssl.rb +1 -1
- data/test/soap/struct/test_struct.rb +2 -2
- data/test/soap/swa/test_file.rb +1 -1
- data/test/soap/test_basetype.rb +1 -1
- data/test/soap/test_cookie.rb +2 -2
- data/test/soap/test_custom_ns.rb +4 -4
- data/test/soap/test_custommap.rb +1 -1
- data/test/soap/test_empty.rb +6 -6
- data/test/soap/test_envelopenamespace.rb +2 -2
- data/test/soap/test_extraattr.rb +2 -2
- data/test/soap/test_generator.rb +5 -3
- data/test/soap/test_httpconfigloader.rb +1 -1
- data/test/soap/test_mapping.rb +1 -1
- data/test/soap/test_nestedexception.rb +28 -14
- data/test/soap/test_nil.rb +23 -28
- data/test/soap/test_no_indent.rb +3 -3
- data/test/soap/test_property.rb +2 -2
- data/test/soap/test_response_as_xml.rb +4 -4
- data/test/soap/test_soapelement.rb +1 -1
- data/test/soap/test_streamhandler.rb +2 -2
- data/test/soap/test_styleuse.rb +2 -2
- data/test/soap/wsdlDriver/test_calc.rb +2 -2
- data/test/soap/wsdlDriver/test_document.rb +2 -2
- data/test/soap/wsdlDriver/test_simpletype.rb +3 -2
- data/test/testutil.rb +4 -4
- data/test/wsdl/abstract/test_abstract.rb +2 -2
- data/test/wsdl/anonymous/test_anonymous.rb +2 -2
- data/test/wsdl/any/test_any.rb +2 -2
- data/test/wsdl/axisArray/test_axisarray.rb +2 -2
- data/test/wsdl/choice/test_choice.rb +2 -2
- data/test/wsdl/complexcontent/test_echo.rb +2 -2
- data/test/wsdl/datetime/test_datetime.rb +3 -2
- data/test/wsdl/document/array/test_array.rb +2 -2
- data/test/wsdl/document/test_nosoapaction.rb +2 -2
- data/test/wsdl/document/test_number.rb +2 -2
- data/test/wsdl/document/test_rpc.rb +2 -2
- data/test/wsdl/fault/multifault.wsdl +8 -8
- data/test/wsdl/fault/test_fault.rb +3 -3
- data/test/wsdl/fault/test_multifault.rb +13 -13
- data/test/wsdl/group/test_rpc.rb +2 -2
- data/test/wsdl/list/test_list.rb +2 -2
- data/test/wsdl/map/test_map.rb +1 -1
- data/test/wsdl/marshal/test_wsdlmarshal.rb +3 -4
- data/test/wsdl/oneway/test_oneway.rb +2 -2
- data/test/wsdl/overload/test_overload.rb +2 -2
- data/test/wsdl/qualified/test_qualified.rb +4 -4
- data/test/wsdl/qualified/test_unqualified.rb +4 -4
- data/test/wsdl/raa/test_raa.rb +4 -4
- data/test/wsdl/ref/test_ref.rb +2 -2
- data/test/wsdl/rpc/test_rpc.rb +2 -2
- data/test/wsdl/rpc/test_rpc_lit.rb +18 -18
- data/test/wsdl/simplecontent/test_simplecontent.rb +2 -2
- data/test/wsdl/simpletype/rpc/test_rpc.rb +2 -2
- data/test/wsdl/simpletype/test_simpletype.rb +2 -2
- data/test/wsdl/soap/test_soapbodyparts.rb +1 -1
- data/test/wsdl/soap/wsdl2ruby/section/test_section.rb +2 -2
- data/test/wsdl/soap/wsdl2ruby/soapenc/test_soapenc.rb +2 -2
- data/test/wsdl/soap/wsdl2ruby/test_wsdl2ruby.rb +2 -2
- data/test/wsdl/soaptype/test_soaptype.rb +5 -5
- data/test/wsdl/test_emptycomplextype.rb +1 -1
- data/test/wsdl/test_fault.rb +1 -1
- data/test/wsdl/test_multiplefault.rb +1 -1
- data/test/xsd/codegen/test_classdef.rb +1 -1
- data/test/xsd/test_noencoding.rb +1 -1
- data/test/xsd/test_ns.rb +1 -1
- data/test/xsd/test_xmlschemaparser.rb +1 -1
- data/test/xsd/test_xsd.rb +1 -1
- data/test/xsd/xsd2ruby/test_xsd2ruby.rb +3 -3
- metadata +24 -33
- data/lib/soap/rpc/element.rb.orig +0 -378
- data/lib/soap/ruby18ext.rb +0 -13
- data/lib/xsd/xmlparser.rb.orig +0 -110
- data/test/results +0 -4810
- data/test/soap/header/session.pstoredb +0 -0
- data/test/wsdl/marshal/Person.rb +0 -1
- data/test/wsdl/simpletype/rpc/echo_version.rb +0 -1
- data/test/wsdl/simpletype/rpc/echo_versionDriver.rb +0 -10
- data/test/wsdl/simpletype/rpc/echo_versionMappingRegistry.rb +0 -4
- data/test/wsdl/simpletype/rpc/echo_versionServant.rb +0 -3
- data/test/wsdl/simpletype/rpc/echo_version_service.rb +0 -3
- data/test/wsdl/simpletype/rpc/echo_version_serviceClient.rb +0 -34
- data/test/wsdl/soap/wsdl2ruby/echo_version.rb +0 -1
- data/test/wsdl/soap/wsdl2ruby/echo_versionDriver.rb +0 -10
- data/test/wsdl/soap/wsdl2ruby/echo_versionMappingRegistry.rb +0 -4
- data/test/wsdl/soap/wsdl2ruby/echo_versionServant.rb +0 -3
- data/test/wsdl/soap/wsdl2ruby/echo_version_service.cgi +0 -3
- data/test/wsdl/soap/wsdl2ruby/echo_version_service.rb +0 -7
- data/test/wsdl/soap/wsdl2ruby/echo_version_serviceClient.rb +0 -34
data/bin/wsdl2ruby.rb
CHANGED
data/bin/xsd2ruby.rb
CHANGED
data/lib/soap/baseData.rb
CHANGED
@@ -1079,7 +1079,7 @@ private
|
|
1079
1079
|
"#{typename}[" << ',' * (rank - 1) << ']'
|
1080
1080
|
end
|
1081
1081
|
|
1082
|
-
TypeParseRegexp = Regexp.new('^(.+)\[([\d,]*)\]$')
|
1082
|
+
TypeParseRegexp = Regexp.new('^(.+)\[([\d,]*)\]$', nil, 'n')
|
1083
1083
|
|
1084
1084
|
def self.parse_type(string)
|
1085
1085
|
TypeParseRegexp =~ string
|
data/lib/soap/element.rb
CHANGED
@@ -103,8 +103,6 @@ class SOAPBody < SOAPStruct
|
|
103
103
|
if data
|
104
104
|
if data.respond_to?(:to_xmlpart)
|
105
105
|
data = SOAP::SOAPRawData.new(data)
|
106
|
-
elsif defined?(::Nokogiri) and data.is_a?(::Nokogiri::XML::Document)
|
107
|
-
data = SOAP::SOAPRawData.new(SOAP::SOAPREXMLElementWrap.new(data.children[0]))
|
108
106
|
elsif defined?(::REXML) and data.is_a?(::REXML::Element)
|
109
107
|
data = SOAP::SOAPRawData.new(SOAP::SOAPREXMLElementWrap.new(data))
|
110
108
|
end
|
data/lib/soap/generator.rb
CHANGED
@@ -269,8 +269,7 @@ private
|
|
269
269
|
end
|
270
270
|
|
271
271
|
def get_encode_char_regexp
|
272
|
-
ENCODE_CHAR_REGEXP[XSD::Charset.encoding] ||=
|
273
|
-
Regexp.new("[#{EncodeMap.keys.join}]")
|
272
|
+
ENCODE_CHAR_REGEXP[XSD::Charset.encoding] ||= Regexp.new("[#{EncodeMap.keys.join}]", nil, (RUBY_VERSION.to_f >= 1.9) ? 'n' : XSD::Charset.encoding) # RubyJedi: compatible with Ruby 1.8.6 and above
|
274
273
|
end
|
275
274
|
|
276
275
|
def find_handler(encodingstyle)
|
@@ -463,6 +463,7 @@ private
|
|
463
463
|
else
|
464
464
|
child = Mapping.get_attribute(obj, eledef.varname)
|
465
465
|
if child.respond_to?(:each) and eledef.as_array?
|
466
|
+
child = child.lines if child.respond_to?(:lines) # RubyJedi: compatible with Ruby 1.8.6 and above
|
466
467
|
child.each do |item|
|
467
468
|
ele.add(name, typedobj2soap(item, eledef.mapped_class))
|
468
469
|
end
|
data/lib/soap/mapping/factory.rb
CHANGED
@@ -37,12 +37,12 @@ class Factory
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def setiv2soap(node, obj, map)
|
40
|
-
if obj.class.class_variables.include?(
|
40
|
+
if obj.class.class_variables.include?('@@schema_element')
|
41
41
|
setdefinediv2soap(node, obj, map)
|
42
42
|
else
|
43
43
|
# should we sort instance_variables? how?
|
44
44
|
obj.instance_variables.each do |var|
|
45
|
-
name = var.to_s.sub(/^@/, '')
|
45
|
+
name = var.to_s.sub(/^@/, '')
|
46
46
|
elename = Mapping.name2elename(name)
|
47
47
|
node.add(elename,
|
48
48
|
Mapping._obj2soap(obj.instance_variable_get(var), map))
|
data/lib/soap/mapping/mapping.rb
CHANGED
@@ -165,10 +165,9 @@ module Mapping
|
|
165
165
|
# ex. a.b => a.2eb
|
166
166
|
#
|
167
167
|
def self.name2elename(name)
|
168
|
-
name
|
169
|
-
name.gsub(/([^a-zA-Z0-9:_\-]+)/n) {
|
168
|
+
name.to_s.gsub(/([^a-zA-Z0-9:_\-]+)/n) {
|
170
169
|
'.' << $1.unpack('H2' * $1.size).join('.')
|
171
|
-
}.gsub(/::/n, '..')
|
170
|
+
}.gsub(/::/n, '..')
|
172
171
|
end
|
173
172
|
|
174
173
|
def self.elename2name(name)
|
@@ -541,7 +540,7 @@ module Mapping
|
|
541
540
|
private
|
542
541
|
|
543
542
|
def class_schema_variable(sym, klass)
|
544
|
-
var = "@@#{sym}"
|
543
|
+
var = "@@#{sym}"
|
545
544
|
klass.class_variables.include?(var) ? klass.class_eval(var) : nil
|
546
545
|
end
|
547
546
|
|
@@ -50,21 +50,6 @@ class Object
|
|
50
50
|
@__xmlele
|
51
51
|
end
|
52
52
|
|
53
|
-
def to_hash
|
54
|
-
result = {}
|
55
|
-
@__xmlele.each do |qname, value|
|
56
|
-
result[qname.name.to_sym] = begin
|
57
|
-
case value
|
58
|
-
when SOAP::Mapping::Object
|
59
|
-
value.to_hash
|
60
|
-
else
|
61
|
-
value
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
result
|
66
|
-
end
|
67
|
-
|
68
53
|
def [](qname)
|
69
54
|
qname = Mapping.to_qname(qname)
|
70
55
|
@__xmlele.each do |k, v|
|
@@ -123,8 +123,8 @@ private
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def simpleobj2soap(obj, type)
|
126
|
-
return SOAPNil.new unless obj
|
127
126
|
type.check_lexical_format(obj)
|
127
|
+
return SOAPNil.new if obj.nil? # TODO: check nillable.
|
128
128
|
if type.base
|
129
129
|
ele = base2soap(obj, TypeMap[type.base])
|
130
130
|
ele.type = type.name
|
data/lib/soap/mimemessage.rb
CHANGED
data/lib/soap/nestedexception.rb
CHANGED
@@ -20,7 +20,7 @@ module NestedException
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def set_backtrace(backtrace)
|
23
|
-
if @cause and @cause.respond_to?(:backtrace)
|
23
|
+
if defined?(@cause) and @cause.respond_to?(:backtrace)
|
24
24
|
@original_backtrace = backtrace
|
25
25
|
=begin
|
26
26
|
# for agressive backtrace abstraction: 'here' only should not be good
|
data/lib/soap/netHttpClient.rb
CHANGED
@@ -176,13 +176,13 @@ private
|
|
176
176
|
http.open_timeout = @connect_timeout if @connect_timeout
|
177
177
|
http.read_timeout = @receive_timeout if @receive_timeout
|
178
178
|
case url
|
179
|
-
when URI::HTTPS
|
179
|
+
when URI::HTTPS
|
180
180
|
if SSLEnabled
|
181
|
-
|
181
|
+
http.use_ssl = true
|
182
182
|
else
|
183
|
-
|
183
|
+
raise RuntimeError.new("Cannot connect to #{url} (OpenSSL is not installed.)")
|
184
184
|
end
|
185
|
-
when URI::HTTP
|
185
|
+
when URI::HTTP
|
186
186
|
# OK
|
187
187
|
else
|
188
188
|
raise RuntimeError.new("Cannot connect to #{url} (Not HTTP.)")
|
data/lib/soap/ns.rb
CHANGED
@@ -13,6 +13,10 @@ require 'soap/soap'
|
|
13
13
|
|
14
14
|
module SOAP
|
15
15
|
|
16
|
+
## Rubyjedi: Provide these (deprecated) constants for backward compatibility with older ActionWebService
|
17
|
+
SOAPNamespaceTag = 'env'
|
18
|
+
XSDNamespaceTag = 'xsd'
|
19
|
+
XSINamespaceTag = 'xsi'
|
16
20
|
|
17
21
|
class NS < XSD::NS
|
18
22
|
KNOWN_TAG = XSD::NS::KNOWN_TAG.dup.update(
|
data/lib/soap/property.rb
CHANGED
@@ -65,12 +65,18 @@ class Property
|
|
65
65
|
|
66
66
|
KEY_REGSRC = '([^=:\\\\]*(?:\\\\.[^=:\\\\]*)*)'
|
67
67
|
DEF_REGSRC = '\\s*' + KEY_REGSRC + '\\s*[=:]\\s*(.*)'
|
68
|
-
COMMENT_REGEXP = Regexp.new(
|
69
|
-
CATDEF_REGEXP = Regexp.new("^\\[\\s*#{KEY_REGSRC}\\s*\\]$")
|
70
|
-
LINE_REGEXP = Regexp.new("^#{DEF_REGSRC}$")
|
68
|
+
#COMMENT_REGEXP = Regexp.new('^(?:#.*|)$', nil, 'u')
|
69
|
+
#CATDEF_REGEXP = Regexp.new("^\\[\\s*#{KEY_REGSRC}\\s*\\]$", nil, 'u')
|
70
|
+
#LINE_REGEXP = Regexp.new("^#{DEF_REGSRC}$", nil, 'u')
|
71
|
+
|
72
|
+
COMMENT_REGEXP = Regexp.new('^(?:#.*|)$') # RubyJedi: Attempt at 1.9 Compatibility // , nil, 'u')
|
73
|
+
CATDEF_REGEXP = Regexp.new("^\\[\\s*#{KEY_REGSRC}\\s*\\]$") # RubyJedi: Attempt at 1.9 Compatibility // , nil, 'u')
|
74
|
+
LINE_REGEXP = Regexp.new("^#{DEF_REGSRC}$") # RubyJedi: Attempt at 1.9 Compatibility // , nil, 'u')
|
75
|
+
|
71
76
|
def load(stream)
|
72
77
|
key_prefix = ""
|
73
|
-
stream.
|
78
|
+
stream = stream.lines if stream.respond_to?(:lines) # RubyJedi: compatible with Ruby 1.8.6 and above
|
79
|
+
stream.each_with_index do |line, lineno|
|
74
80
|
line.sub!(/\r?\n\z/u, '')
|
75
81
|
case line
|
76
82
|
when COMMENT_REGEXP
|
@@ -320,14 +326,14 @@ end
|
|
320
326
|
|
321
327
|
|
322
328
|
# for ruby/1.6.
|
323
|
-
unless Enumerable.
|
324
|
-
module Enumerable
|
325
|
-
def inject(init)
|
326
|
-
result = init
|
327
|
-
each do |item|
|
328
|
-
|
329
|
-
end
|
330
|
-
result
|
331
|
-
end
|
332
|
-
end
|
333
|
-
end
|
329
|
+
#unless Enumerable.instance_methods.include?(:inject)
|
330
|
+
# module Enumerable
|
331
|
+
# def inject(init)
|
332
|
+
# result = init
|
333
|
+
# each do |item|
|
334
|
+
# result = yield(result, item)
|
335
|
+
# end
|
336
|
+
# result
|
337
|
+
# end
|
338
|
+
# end
|
339
|
+
#end
|
data/lib/soap/rpc/element.rb
CHANGED
@@ -230,7 +230,7 @@ private
|
|
230
230
|
mapped_class = SOAPMethod.parse_mapped_class(param.mapped_class)
|
231
231
|
qname = param.qname
|
232
232
|
if qname.nil? and mapped_class
|
233
|
-
qname = TypeMap.key(mapped_class)
|
233
|
+
qname = TypeMap.respond_to?(:key) ? TypeMap.key(mapped_class) : TypeMap.index(mapped_class) # RubyJedi: compatible with Ruby 1.8.6 and above
|
234
234
|
end
|
235
235
|
case param.io_type
|
236
236
|
when IN
|
@@ -14,7 +14,7 @@ module RPC
|
|
14
14
|
|
15
15
|
|
16
16
|
class StandaloneServer < HTTPServer
|
17
|
-
def initialize(appname, default_namespace, host = "0.0.0.0", port =
|
17
|
+
def initialize(appname, default_namespace, host = "0.0.0.0", port = 8080)
|
18
18
|
@appname = appname
|
19
19
|
@default_namespace = default_namespace
|
20
20
|
@host = host
|
data/lib/soap/soap.rb
CHANGED
@@ -5,16 +5,18 @@
|
|
5
5
|
# redistribute it and/or modify it under the same terms of Ruby's license;
|
6
6
|
# either the dual license version in 2003, or any later version.
|
7
7
|
|
8
|
-
|
8
|
+
|
9
9
|
require 'xsd/qname'
|
10
10
|
require 'xsd/charset'
|
11
11
|
require 'soap/nestedexception'
|
12
|
+
require 'soap/version'
|
12
13
|
|
13
14
|
|
14
15
|
module SOAP
|
15
16
|
|
16
17
|
|
17
|
-
VERSION = Version = '1.
|
18
|
+
# VERSION = Version = SOAP::VERSION::STRING # '1.5.8-HEAD'
|
19
|
+
Version = SOAP::VERSION::STRING # '1.5.8-HEAD'
|
18
20
|
PropertyName = 'soap/property'
|
19
21
|
|
20
22
|
EnvelopeNamespace = 'http://schemas.xmlsoap.org/soap/envelope/'
|
data/lib/soap/streamHandler.rb
CHANGED
@@ -142,7 +142,7 @@ public
|
|
142
142
|
|
143
143
|
def initialize(options)
|
144
144
|
super()
|
145
|
-
@client = Client.new(nil, "SOAP4R/#{ Version }")
|
145
|
+
@client = Client.new(nil, "RUBYJEDI-SOAP4R/#{ Version }")
|
146
146
|
if @client.respond_to?(:request_filter)
|
147
147
|
@client.request_filter << HttpPostRequestFilter.new(@filterchain)
|
148
148
|
end
|
data/lib/soap/version.rb
ADDED
data/lib/soap/wsdlDriver.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# redistribute it and/or modify it under the same terms of Ruby's license;
|
6
6
|
# either the dual license version in 2003, or any later version.
|
7
7
|
|
8
|
-
|
8
|
+
|
9
9
|
require 'wsdl/parser'
|
10
10
|
require 'wsdl/importer'
|
11
11
|
require 'xsd/qname'
|
@@ -124,7 +124,7 @@ private
|
|
124
124
|
|
125
125
|
def add_operation(drv, binding)
|
126
126
|
name_creator = WSDL::SOAP::ClassNameCreator.new
|
127
|
-
modulepath =
|
127
|
+
modulepath = 'WSDLDriverFactory'
|
128
128
|
methoddefcreator =
|
129
129
|
WSDL::SOAP::MethodDefCreator.new(@wsdl, name_creator, modulepath, {})
|
130
130
|
mdefs = methoddefcreator.create(binding.name)
|
data/lib/wsdl/parser.rb
CHANGED
@@ -113,10 +113,10 @@ private
|
|
113
113
|
elename = ns.parse(name)
|
114
114
|
if !parent
|
115
115
|
if elename == DefinitionsName
|
116
|
-
|
116
|
+
o = Definitions.parse_element(elename)
|
117
117
|
o.location = @location
|
118
118
|
else
|
119
|
-
|
119
|
+
raise UnknownElementError.new("unknown element: #{elename}")
|
120
120
|
end
|
121
121
|
o.root = @originalroot if @originalroot # o.root = o otherwise
|
122
122
|
else
|
@@ -128,10 +128,10 @@ private
|
|
128
128
|
end
|
129
129
|
if o.nil?
|
130
130
|
unless @ignored.key?(elename)
|
131
|
-
warn("ignored element: #{elename}
|
131
|
+
warn("ignored element: #{elename}")
|
132
132
|
@ignored[elename] = elename
|
133
133
|
end
|
134
|
-
|
134
|
+
o = Documentation.new # which accepts any element.
|
135
135
|
end
|
136
136
|
# node could be a pseudo element. pseudo element has its own parent.
|
137
137
|
o.root = parent.root
|
@@ -33,7 +33,8 @@ class ClientSkeltonCreator
|
|
33
33
|
result = ""
|
34
34
|
if @modulepath
|
35
35
|
result << "\n"
|
36
|
-
|
36
|
+
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
|
37
|
+
result << modulepath.collect { |ele| "module #{ele}" }.join("; ")
|
37
38
|
result << "\n\n"
|
38
39
|
end
|
39
40
|
services.ports.each do |port|
|
@@ -42,7 +43,8 @@ class ClientSkeltonCreator
|
|
42
43
|
end
|
43
44
|
if @modulepath
|
44
45
|
result << "\n\n"
|
45
|
-
|
46
|
+
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
|
47
|
+
result << modulepath.collect { |ele| "end" }.join("; ")
|
46
48
|
result << "\n"
|
47
49
|
end
|
48
50
|
result
|
@@ -33,7 +33,8 @@ class DriverCreator
|
|
33
33
|
def dump(porttype = nil)
|
34
34
|
result = "require 'soap/rpc/driver'\n\n"
|
35
35
|
if @modulepath
|
36
|
-
@modulepath.
|
36
|
+
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
|
37
|
+
modulepath.each do |name|
|
37
38
|
result << "module #{name}\n"
|
38
39
|
end
|
39
40
|
result << "\n"
|
@@ -48,7 +49,8 @@ class DriverCreator
|
|
48
49
|
end
|
49
50
|
if @modulepath
|
50
51
|
result << "\n"
|
51
|
-
@modulepath.
|
52
|
+
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
|
53
|
+
modulepath.each do |name|
|
52
54
|
result << "end\n"
|
53
55
|
end
|
54
56
|
end
|
@@ -165,7 +165,7 @@ __EOD__
|
|
165
165
|
elsif definedtype = @complextypes[part.type]
|
166
166
|
return ['::SOAP::SOAPElement', part.type]
|
167
167
|
else
|
168
|
-
|
168
|
+
raise RuntimeError.new("part: #{part.name} cannot be resolved")
|
169
169
|
end
|
170
170
|
end
|
171
171
|
|
@@ -31,7 +31,8 @@ class ServantSkeltonCreator
|
|
31
31
|
result = ""
|
32
32
|
if @modulepath
|
33
33
|
result << "\n"
|
34
|
-
|
34
|
+
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
|
35
|
+
result << modulepath.collect { |ele| "module #{ele}" }.join("; ")
|
35
36
|
result << "\n\n"
|
36
37
|
end
|
37
38
|
if porttype.nil?
|
@@ -44,7 +45,8 @@ class ServantSkeltonCreator
|
|
44
45
|
end
|
45
46
|
if @modulepath
|
46
47
|
result << "\n\n"
|
47
|
-
|
48
|
+
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
|
49
|
+
result << modulepath.collect { |ele| "end" }.join("; ")
|
48
50
|
result << "\n"
|
49
51
|
end
|
50
52
|
result
|
data/lib/wsdl/soap/wsdl2ruby.rb
CHANGED
@@ -58,7 +58,7 @@ private
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def create_file
|
61
|
-
@modulepath =
|
61
|
+
@modulepath = @opt['module_path']
|
62
62
|
create_classdef if @opt.key?('classdef')
|
63
63
|
create_mapping_registry if @opt.key?('mapping_registry')
|
64
64
|
create_servant_skelton(@opt['servant_skelton']) if @opt.key?('servant_skelton')
|
@@ -111,10 +111,10 @@ private
|
|
111
111
|
elename = ns.parse(name)
|
112
112
|
if !parent
|
113
113
|
if elename == SchemaName
|
114
|
-
|
114
|
+
o = Schema.parse_element(elename)
|
115
115
|
o.location = @location
|
116
116
|
else
|
117
|
-
|
117
|
+
raise UnknownElementError.new("unknown element: #{elename}")
|
118
118
|
end
|
119
119
|
o.root = @originalroot if @originalroot # o.root = o otherwise
|
120
120
|
else
|
@@ -129,7 +129,7 @@ private
|
|
129
129
|
warn("ignored element: #{elename} of #{parent.class}")
|
130
130
|
@ignored[elename] = elename
|
131
131
|
end
|
132
|
-
|
132
|
+
o = Documentation.new # which accepts any element.
|
133
133
|
end
|
134
134
|
# node could be a pseudo element. pseudo element has its own parent.
|
135
135
|
o.root = parent.root
|
@@ -140,7 +140,7 @@ private
|
|
140
140
|
value_ele = ns.parse(value, false)
|
141
141
|
value_ele.source = value # for recovery; value may not be a QName
|
142
142
|
if attr_ele == IdAttrName
|
143
|
-
|
143
|
+
o.id = value_ele
|
144
144
|
else
|
145
145
|
if o.parse_attr(attr_ele, value_ele).nil?
|
146
146
|
unless @ignored.key?(attr_ele)
|