soap4r-ng 2.0.3 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/soap/baseData.rb +1 -1
- data/lib/soap/generator.rb +9 -1
- data/lib/soap/mapping/encodedregistry.rb +14 -4
- data/lib/soap/mapping/rubytypeFactory.rb +6 -1
- data/lib/soap/property.rb +4 -2
- data/lib/soap/rpc/cgistub.rb +6 -3
- data/lib/soap/rpc/httpserver.rb +8 -1
- data/lib/soap/version.rb +1 -1
- data/lib/xsd/charset.rb +4 -4
- data/lib/xsd/xmlparser/oxparser.rb +1 -1
- metadata +7 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7ee42117a6f0c89fd3dbf5a3fb81a4953dcb4ab6a6a0b7b17d701fd4a1df5692
|
4
|
+
data.tar.gz: 9c1cd45b938b7763bf30fd62670bf2119054129f44b2cb86f9c421e7ba8e7861
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c967b100a580ee46c0b4825579f4c195a292f22764ecb18789c447d12572f30de45c051d4a5ad7a2dc9bab72d73520e63c5ca23877998b706bb6a8797c267aff
|
7
|
+
data.tar.gz: cc8c9af693fff6f4c3e88e66cc4ed489f05e9b98e8edee3f2a7c1568f956b552be1dadb2738ded70e14a273ffff1054927f79b49997f4052fcb6872a8ad3c443
|
data/lib/soap/baseData.rb
CHANGED
@@ -1080,7 +1080,7 @@ private
|
|
1080
1080
|
"#{typename}[" << ',' * (rank - 1) << ']'
|
1081
1081
|
end
|
1082
1082
|
|
1083
|
-
TypeParseRegexp = Regexp.new('^(.+)\[([\d,]*)\]$',
|
1083
|
+
TypeParseRegexp = Regexp.new('^(.+)\[([\d,]*)\]$', Regexp::NOENCODING)
|
1084
1084
|
|
1085
1085
|
def self.parse_type(string)
|
1086
1086
|
TypeParseRegexp =~ string
|
data/lib/soap/generator.rb
CHANGED
@@ -270,7 +270,15 @@ private
|
|
270
270
|
end
|
271
271
|
|
272
272
|
def get_encode_char_regexp
|
273
|
-
ENCODE_CHAR_REGEXP[XSD::Charset.encoding] ||=
|
273
|
+
ENCODE_CHAR_REGEXP[XSD::Charset.encoding] ||= begin
|
274
|
+
if RUBY_VERSION.to_f <= 1.8
|
275
|
+
Regexp.new("[#{EncodeMap.keys.join}]", nil, XSD::Charset.encoding)
|
276
|
+
elsif RUBY_VERSION.to_f < 3.3
|
277
|
+
Regexp.new("[#{EncodeMap.keys.join}]", nil, nil) # RubyJedi: compatible with Ruby 1.8.6 and above
|
278
|
+
else
|
279
|
+
Regexp.new("[#{EncodeMap.keys.join}]")
|
280
|
+
end
|
281
|
+
end
|
274
282
|
end
|
275
283
|
|
276
284
|
def find_handler(encodingstyle)
|
@@ -6,6 +6,11 @@
|
|
6
6
|
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
7
|
# either the dual license version in 2003, or any later version.
|
8
8
|
|
9
|
+
# in 2.4, 2.5 Fixnum/Bignum aliased to 'Integer'
|
10
|
+
FixnumShim = 1.class
|
11
|
+
FIXNUM_PRESENT = FixnumShim.name == 'Fixnum'
|
12
|
+
BignumShim = (10**20).class
|
13
|
+
BIGNUM_PRESENT = BignumShim.name == 'Bignum'
|
9
14
|
|
10
15
|
require 'soap/baseData'
|
11
16
|
require 'soap/mapping/mapping'
|
@@ -122,7 +127,7 @@ class EncodedRegistry
|
|
122
127
|
|
123
128
|
StringFactory = StringFactory_.new
|
124
129
|
BasetypeFactory = BasetypeFactory_.new
|
125
|
-
FixnumFactory = FixnumFactory_.new
|
130
|
+
FixnumFactory = FixnumFactory_.new if FIXNUM_PRESENT
|
126
131
|
DateTimeFactory = DateTimeFactory_.new
|
127
132
|
ArrayFactory = ArrayFactory_.new
|
128
133
|
Base64Factory = Base64Factory_.new
|
@@ -146,7 +151,6 @@ class EncodedRegistry
|
|
146
151
|
{:derived_class => true}],
|
147
152
|
[::Float, ::SOAP::SOAPFloat, BasetypeFactory,
|
148
153
|
{:derived_class => true}],
|
149
|
-
[::Fixnum, ::SOAP::SOAPInt, FixnumFactory],
|
150
154
|
[::Integer, ::SOAP::SOAPInt, BasetypeFactory,
|
151
155
|
{:derived_class => true}],
|
152
156
|
[::Integer, ::SOAP::SOAPLong, BasetypeFactory,
|
@@ -199,6 +203,8 @@ class EncodedRegistry
|
|
199
203
|
{:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}],
|
200
204
|
]
|
201
205
|
|
206
|
+
SOAPBaseMap << [FixnumShim, ::SOAP::SOAPInt, FixnumFactory] if FIXNUM_PRESENT
|
207
|
+
|
202
208
|
RubyOriginalMap = [
|
203
209
|
[::NilClass, ::SOAP::SOAPNil, BasetypeFactory],
|
204
210
|
[::TrueClass, ::SOAP::SOAPBoolean, BasetypeFactory],
|
@@ -212,7 +218,6 @@ class EncodedRegistry
|
|
212
218
|
{:derived_class => true}],
|
213
219
|
[::Float, ::SOAP::SOAPFloat, BasetypeFactory,
|
214
220
|
{:derived_class => true}],
|
215
|
-
[::Fixnum, ::SOAP::SOAPInt, FixnumFactory],
|
216
221
|
[::Integer, ::SOAP::SOAPInt, BasetypeFactory,
|
217
222
|
{:derived_class => true}],
|
218
223
|
[::Integer, ::SOAP::SOAPLong, BasetypeFactory,
|
@@ -263,6 +268,8 @@ class EncodedRegistry
|
|
263
268
|
{:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}],
|
264
269
|
]
|
265
270
|
|
271
|
+
RubyOriginalMap << [FixnumShim, ::SOAP::SOAPInt, FixnumFactory] if FIXNUM_PRESENT
|
272
|
+
|
266
273
|
attr_accessor :default_factory
|
267
274
|
attr_accessor :excn_handler_obj2soap
|
268
275
|
attr_accessor :excn_handler_soap2obj
|
@@ -411,7 +418,10 @@ private
|
|
411
418
|
end
|
412
419
|
|
413
420
|
def addextend2soap(node, obj)
|
414
|
-
return if [Symbol,
|
421
|
+
return if [Symbol, Integer, Float].any?{ |c| obj.is_a?(c) }
|
422
|
+
return if FIXNUM_PRESENT && obj.is_a?(FixnumShim)
|
423
|
+
return if BIGNUM_PRESENT && obj.is_a?(BignumShim)
|
424
|
+
return if obj.is_a?(String) && obj.frozen?
|
415
425
|
list = (class << obj; self; end).ancestors - obj.class.ancestors
|
416
426
|
list = list.reject{|c| c.class == Class } ## As of Ruby 2.1 Singleton Classes are now included in the ancestry. Need to filter those out here.
|
417
427
|
|
@@ -6,6 +6,10 @@
|
|
6
6
|
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
7
|
# either the dual license version in 2003, or any later version.
|
8
8
|
|
9
|
+
old_verbose, $VERBOSE = $VERBOSE, nil # silence warnings
|
10
|
+
DATA_PRESENT = defined?(Data)
|
11
|
+
DataShim = Kernel.const_get('Data') if DATA_PRESENT
|
12
|
+
$VERBOSE = old_verbose
|
9
13
|
|
10
14
|
module SOAP
|
11
15
|
module Mapping
|
@@ -38,6 +42,7 @@ class RubytypeFactory < Factory
|
|
38
42
|
|
39
43
|
def obj2soap(soap_class, obj, info, map)
|
40
44
|
param = nil
|
45
|
+
|
41
46
|
case obj
|
42
47
|
when ::String
|
43
48
|
unless @allow_original_mapping
|
@@ -193,7 +198,7 @@ class RubytypeFactory < Factory
|
|
193
198
|
param.add('member', ele_member)
|
194
199
|
addiv2soapattr(param, obj, map)
|
195
200
|
end
|
196
|
-
when ::IO, ::Binding,
|
201
|
+
when ::IO, ::Binding, DataShim, ::Dir, ::File::Stat,
|
197
202
|
::MatchData, Method, ::Proc, ::Process::Status, ::Thread,
|
198
203
|
::ThreadGroup, ::UnboundMethod
|
199
204
|
return nil
|
data/lib/soap/property.rb
CHANGED
@@ -33,7 +33,9 @@ module SOAP
|
|
33
33
|
# aaa.hhh = iii
|
34
34
|
#
|
35
35
|
class Property
|
36
|
-
|
36
|
+
unless defined?(FrozenError) # defined since 2.5
|
37
|
+
FrozenError = (RUBY_VERSION >= "1.9.0") ? RuntimeError : TypeError
|
38
|
+
end
|
37
39
|
|
38
40
|
include Enumerable
|
39
41
|
|
@@ -327,4 +329,4 @@ private
|
|
327
329
|
end
|
328
330
|
|
329
331
|
|
330
|
-
end
|
332
|
+
end
|
data/lib/soap/rpc/cgistub.rb
CHANGED
@@ -202,7 +202,7 @@ private
|
|
202
202
|
HTTPVersion = WEBrick::HTTPVersion.new('1.0') # dummy; ignored
|
203
203
|
|
204
204
|
def run
|
205
|
-
res = WEBrick::HTTPResponse.new({:HTTPVersion => HTTPVersion})
|
205
|
+
res = WEBrick::HTTPResponse.new({:HTTPVersion => HTTPVersion, :Logger => logger})
|
206
206
|
begin
|
207
207
|
@log.info { "received a request from '#{ @remote_host }'" }
|
208
208
|
if @fcgi
|
@@ -227,9 +227,12 @@ private
|
|
227
227
|
r.send_http_header
|
228
228
|
buf = res.body
|
229
229
|
else
|
230
|
-
|
230
|
+
# since 2.5 it doesn't work with empty string in WEBRICK::HTTPResponse#send_header(socket)
|
231
|
+
# https://github.com/ruby/ruby/commit/c44978b99f0454b8f00674f2f407893c8c47248e
|
232
|
+
buf = StringIO.new
|
231
233
|
res.send_response(buf)
|
232
|
-
|
234
|
+
|
235
|
+
buf = buf.string.sub(/^[^\r]+\r\n/, '') # Trim status line.
|
233
236
|
end
|
234
237
|
@log.debug { "SOAP CGI Response:\n#{ buf }" }
|
235
238
|
if @fcgi
|
data/lib/soap/rpc/httpserver.rb
CHANGED
@@ -41,6 +41,7 @@ class HTTPServer < Logger::Application
|
|
41
41
|
@router = ::SOAP::RPC::Router.new(actor)
|
42
42
|
@soaplet = ::SOAP::RPC::SOAPlet.new(@router)
|
43
43
|
on_init
|
44
|
+
|
44
45
|
@server = WEBrick::HTTPServer.new(@webrick_config)
|
45
46
|
@server.mount('/soaprouter', @soaplet)
|
46
47
|
if wsdldir = config[:WSDLDocumentDirectory]
|
@@ -58,7 +59,13 @@ class HTTPServer < Logger::Application
|
|
58
59
|
end
|
59
60
|
|
60
61
|
def shutdown
|
61
|
-
|
62
|
+
if @server
|
63
|
+
@server.shutdown
|
64
|
+
while (@server.listeners.length > 0) && (@server.tokens.length > 0) && (@server.status != :Stop)
|
65
|
+
sleep(0.25)
|
66
|
+
end
|
67
|
+
sleep(0.25) # One more for good measure.
|
68
|
+
end
|
62
69
|
end
|
63
70
|
|
64
71
|
def authenticator
|
data/lib/soap/version.rb
CHANGED
data/lib/xsd/charset.rb
CHANGED
@@ -130,18 +130,18 @@ public
|
|
130
130
|
|
131
131
|
# us_ascii = '[\x00-\x7F]'
|
132
132
|
us_ascii = '[\x9\xa\xd\x20-\x7F]' # XML 1.0 restricted.
|
133
|
-
USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z",
|
133
|
+
USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z", Regexp::NOENCODING)
|
134
134
|
|
135
135
|
twobytes_euc = '(?:[\x8E\xA1-\xFE][\xA1-\xFE])'
|
136
136
|
threebytes_euc = '(?:\x8F[\xA1-\xFE][\xA1-\xFE])'
|
137
137
|
character_euc = "(?:#{us_ascii}|#{twobytes_euc}|#{threebytes_euc})"
|
138
|
-
EUCRegexp = Regexp.new("\\A#{character_euc}*\\z",
|
138
|
+
EUCRegexp = Regexp.new("\\A#{character_euc}*\\z", Regexp::NOENCODING)
|
139
139
|
|
140
140
|
# onebyte_sjis = '[\x00-\x7F\xA1-\xDF]'
|
141
141
|
onebyte_sjis = '[\x9\xa\xd\x20-\x7F\xA1-\xDF]' # XML 1.0 restricted.
|
142
142
|
twobytes_sjis = '(?:[\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC])'
|
143
143
|
character_sjis = "(?:#{onebyte_sjis}|#{twobytes_sjis})"
|
144
|
-
SJISRegexp = Regexp.new("\\A#{character_sjis}*\\z",
|
144
|
+
SJISRegexp = Regexp.new("\\A#{character_sjis}*\\z", Regexp::NOENCODING)
|
145
145
|
|
146
146
|
# 0xxxxxxx
|
147
147
|
# 110yyyyy 10xxxxxx
|
@@ -152,7 +152,7 @@ public
|
|
152
152
|
fourbytes_utf8 = '(?:[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])'
|
153
153
|
character_utf8 =
|
154
154
|
"(?:#{us_ascii}|#{twobytes_utf8}|#{threebytes_utf8}|#{fourbytes_utf8})"
|
155
|
-
UTF8Regexp = Regexp.new("\\A#{character_utf8}*\\z",
|
155
|
+
UTF8Regexp = Regexp.new("\\A#{character_utf8}*\\z", Regexp::NOENCODING)
|
156
156
|
|
157
157
|
def Charset.is_us_ascii(str)
|
158
158
|
USASCIIRegexp =~ str
|
@@ -28,7 +28,7 @@ class OxParser < XSD::XMLParser::Parser
|
|
28
28
|
::Ox.sax_parse(handler, string, {:symbolize=> false, :convert_special=> true, :skip=> :skip_return} )
|
29
29
|
else
|
30
30
|
# Use HTMLEntities Decoder. Leave the special-character conversion alone and let HTMLEntities decode it for us.
|
31
|
-
::Ox.sax_parse(handler, string, {})
|
31
|
+
::Ox.sax_parse(handler, string, {:skip=> :skip_none})
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soap4r-ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurence A. Lee, Hiroshi NAKAMURA
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: httpclient
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.6'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '2.6'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: logger-application
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.2
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.2
|
11
|
+
date: 2024-08-03 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
41
13
|
description: Soap4R NextGen (as maintained by RubyJedi) for Ruby 1.8 thru 2.1 and
|
42
14
|
beyond
|
43
15
|
email: rubyjedi@gmail.com, nahi@ruby-lang.org
|
@@ -213,7 +185,7 @@ homepage: http://rubyjedi.github.io/soap4r/
|
|
213
185
|
licenses:
|
214
186
|
- Ruby
|
215
187
|
metadata: {}
|
216
|
-
post_install_message:
|
188
|
+
post_install_message:
|
217
189
|
rdoc_options: []
|
218
190
|
require_paths:
|
219
191
|
- lib
|
@@ -229,9 +201,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
201
|
version: '0'
|
230
202
|
requirements:
|
231
203
|
- none
|
232
|
-
|
233
|
-
|
234
|
-
signing_key:
|
204
|
+
rubygems_version: 3.5.11
|
205
|
+
signing_key:
|
235
206
|
specification_version: 4
|
236
207
|
summary: Soap4R-ng - Soap4R (as maintained by RubyJedi) for Ruby 1.8 thru 2.1 and
|
237
208
|
beyond
|