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/test/soap/ssl/sslsvr.rb
CHANGED
data/test/soap/ssl/test_ssl.rb
CHANGED
data/test/soap/swa/test_file.rb
CHANGED
data/test/soap/test_basetype.rb
CHANGED
data/test/soap/test_cookie.rb
CHANGED
data/test/soap/test_custom_ns.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
require 'soap/processor'
|
3
3
|
|
4
4
|
|
@@ -69,7 +69,7 @@ __XML__
|
|
69
69
|
# normal
|
70
70
|
opt = {}
|
71
71
|
result = SOAP::Processor.marshal(env, opt)
|
72
|
-
|
72
|
+
assert_xml_equal(NORMAL_XML, result)
|
73
73
|
# Envelope ns customize
|
74
74
|
env = SOAP::SOAPEnvelope.new(header, body)
|
75
75
|
ns = XSD::NS.new
|
@@ -80,7 +80,7 @@ __XML__
|
|
80
80
|
tag.assign('my:bar', 'bar')
|
81
81
|
opt = { :default_ns => ns, :default_ns_tag => tag }
|
82
82
|
result = SOAP::Processor.marshal(env, opt)
|
83
|
-
|
83
|
+
assert_xml_equal(CUSTOM_NS_XML, result)
|
84
84
|
end
|
85
85
|
|
86
86
|
def test_default_namespace
|
@@ -97,7 +97,7 @@ __XML__
|
|
97
97
|
# normal
|
98
98
|
opt = {:use_default_namespace => true}
|
99
99
|
result = SOAP::Processor.marshal(env, opt)
|
100
|
-
|
100
|
+
assert_xml_equal(XML_WITH_DEFAULT_NS, result)
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
data/test/soap/test_custommap.rb
CHANGED
data/test/soap/test_empty.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
require 'soap/rpc/standaloneServer'
|
3
3
|
require 'soap/rpc/driver'
|
4
4
|
require 'soap/header/handler'
|
@@ -74,22 +74,22 @@ class TestEmpty < Test::Unit::TestCase
|
|
74
74
|
def test_nop
|
75
75
|
@client.wiredump_dev = str = ''
|
76
76
|
@client.nop
|
77
|
-
|
78
|
-
|
77
|
+
assert_xml_equal(EMPTY_XML, parse_requestxml(str))
|
78
|
+
assert_xml_equal(EMPTY_XML, parse_responsexml(str))
|
79
79
|
end
|
80
80
|
|
81
81
|
def test_nop_nil
|
82
82
|
@client.wiredump_dev = str = ''
|
83
83
|
@client.nop_nil
|
84
|
-
|
85
|
-
|
84
|
+
assert_xml_equal(EMPTY_XML, parse_requestxml(str))
|
85
|
+
assert_xml_equal(EMPTY_XML, parse_responsexml(str))
|
86
86
|
end
|
87
87
|
|
88
88
|
def test_empty_header
|
89
89
|
@client.headerhandler << EmptyHeaderHandler.new(nil)
|
90
90
|
@client.wiredump_dev = str = ''
|
91
91
|
@client.nop
|
92
|
-
|
92
|
+
assert_xml_equal(EMPTY_HEADER_XML, parse_requestxml(str))
|
93
93
|
end
|
94
94
|
|
95
95
|
def parse_requestxml(str)
|
data/test/soap/test_extraattr.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
require 'soap/processor'
|
3
3
|
|
4
4
|
|
@@ -37,7 +37,7 @@ class TestExtrAttr < Test::Unit::TestCase
|
|
37
37
|
env.extraattr["Id"] = "extraattr"
|
38
38
|
g = SOAP::Generator.new()
|
39
39
|
xml = g.generate(env)
|
40
|
-
|
40
|
+
assert_xml_equal(HEADER_XML, xml)
|
41
41
|
#
|
42
42
|
parser = SOAP::Parser.new
|
43
43
|
env = parser.parse(xml)
|
data/test/soap/test_generator.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
require 'soap/processor'
|
3
3
|
|
4
4
|
|
@@ -13,14 +13,16 @@ class TestGenerator < Test::Unit::TestCase
|
|
13
13
|
g.generate(SOAPElement.new('foo'))
|
14
14
|
assert_equal("<", g.encode_string(str)[-4, 4])
|
15
15
|
#
|
16
|
-
|
16
|
+
if RUBY_VERSION.to_f >= 1.9
|
17
|
+
assert_equal("<", g.encode_string(str)[-4, 4])
|
18
|
+
else
|
17
19
|
begin
|
18
20
|
kc_backup = $KCODE.dup
|
19
21
|
$KCODE = 'EUC-JP'
|
20
22
|
assert_equal("<", g.encode_string(str)[-4, 4])
|
21
23
|
ensure
|
22
24
|
$KCODE = kc_backup
|
23
|
-
end
|
25
|
+
end
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
data/test/soap/test_mapping.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
require 'soap/soap'
|
3
3
|
|
4
4
|
|
@@ -38,19 +38,33 @@ class TestNestedException < Test::Unit::TestCase
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
41
|
+
if (RUBY_VERSION.to_f >= 1.9)
|
42
|
+
TOBE = [
|
43
|
+
":15:in `rescue in foo'",
|
44
|
+
":12:in `foo'",
|
45
|
+
":33:in `test_nestedexception'",
|
46
|
+
":23:in `rescue in bar': bar (SOAP::TestNestedException::MyError) [NESTED]",
|
47
|
+
":20:in `bar'",
|
48
|
+
":13:in `foo'",
|
49
|
+
":33:in `test_nestedexception'",
|
50
|
+
":28:in `baz': baz (SOAP::TestNestedException::MyError) [NESTED]",
|
51
|
+
":21:in `bar'",
|
52
|
+
":13:in `foo'",
|
53
|
+
":33:in `test_nestedexception'"
|
54
|
+
]
|
55
|
+
else
|
56
|
+
TOBE = [
|
57
|
+
":15:in `foo'",
|
58
|
+
":33:in `test_nestedexception'",
|
59
|
+
":23:in `bar': bar (SOAP::TestNestedException::MyError) [NESTED]",
|
60
|
+
":13:in `foo'",
|
61
|
+
":33:in `test_nestedexception'",
|
62
|
+
":28:in `baz': baz (SOAP::TestNestedException::MyError) [NESTED]",
|
63
|
+
":21:in `bar'",
|
64
|
+
":13:in `foo'",
|
65
|
+
":33:in `test_nestedexception'",
|
66
|
+
]
|
67
|
+
end
|
53
68
|
end
|
54
69
|
|
55
|
-
|
56
70
|
end
|
data/test/soap/test_nil.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
require 'soap/rpc/standaloneServer'
|
3
3
|
require 'soap/rpc/driver'
|
4
4
|
require 'soap/header/handler'
|
@@ -41,35 +41,30 @@ class TestNil < Test::Unit::TestCase
|
|
41
41
|
@client.reset_stream if @client
|
42
42
|
end
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
# emulates SOAP::Lite's nil request (Nokogiri)
|
47
|
-
def test_soaplite_nil
|
48
|
-
body = SOAP::SOAPBody.new(Nokogiri::XML(<<-__XML__))
|
49
|
-
<nop xsi:nil="true"/>
|
50
|
-
__XML__
|
51
|
-
@client.wiredump_dev = STDOUT if $DEBUG
|
52
|
-
header, body = @client.invoke(nil, body)
|
53
|
-
assert_equal(1, body.root_node["return"].data)
|
54
|
-
end
|
55
|
-
rescue LoadError
|
56
|
-
puts "Nokogiri Not Installed"
|
57
|
-
end
|
44
|
+
require 'rexml/document'
|
45
|
+
# emulates SOAP::Lite's nil request
|
58
46
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
47
|
+
# def test_soaplite_nil
|
48
|
+
# body = SOAP::SOAPBody.new(REXML::Document.new(<<-__XML__))
|
49
|
+
# <nop xsi:nil="true"/>
|
50
|
+
# __XML__
|
51
|
+
# @client.wiredump_dev = STDOUT if $DEBUG
|
52
|
+
# header, body = @client.invoke(nil, body)
|
53
|
+
# assert_equal(1, body.root_node["return"].data)
|
54
|
+
# end
|
55
|
+
|
56
|
+
def test_soaplite_nil
|
57
|
+
body = SOAP::SOAPBody.new(REXML::Document.new(<<-__XML__))
|
58
|
+
<nop/>
|
59
|
+
__XML__
|
60
|
+
@client.wiredump_dev = STDOUT if $DEBUG
|
61
|
+
header, body = @client.invoke(nil, body)
|
62
|
+
assert_equal(1, body.root_node["return"].data)
|
72
63
|
end
|
64
|
+
|
65
|
+
|
66
|
+
|
73
67
|
end
|
74
68
|
|
69
|
+
|
75
70
|
end
|
data/test/soap/test_no_indent.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
require 'soap/rpc/standaloneServer'
|
3
3
|
require 'soap/rpc/driver'
|
4
4
|
|
@@ -67,14 +67,14 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
67
67
|
@client.wiredump_dev = str = ''
|
68
68
|
@client.options["soap.envelope.no_indent"] = false
|
69
69
|
@client.nop
|
70
|
-
|
70
|
+
assert_xml_equal(INDENT_XML, parse_requestxml(str))
|
71
71
|
end
|
72
72
|
|
73
73
|
def test_no_indent
|
74
74
|
@client.wiredump_dev = str = ''
|
75
75
|
@client.options["soap.envelope.no_indent"] = true
|
76
76
|
@client.nop
|
77
|
-
|
77
|
+
assert_xml_equal(NO_INDENT_XML, parse_requestxml(str))
|
78
78
|
end
|
79
79
|
|
80
80
|
def parse_requestxml(str)
|
data/test/soap/test_property.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
|
+
require 'testutil'
|
2
3
|
require 'soap/rpc/httpserver'
|
3
4
|
require 'soap/rpc/driver'
|
4
5
|
require 'rexml/document'
|
5
|
-
require File.join(File.dirname(File.expand_path(__FILE__)), '..', 'testutil.rb')
|
6
6
|
|
7
7
|
|
8
8
|
module SOAP
|
@@ -75,10 +75,10 @@ class TestResponseAsXml < Test::Unit::TestCase
|
|
75
75
|
__XML__
|
76
76
|
|
77
77
|
def test_hello
|
78
|
-
|
78
|
+
assert_xml_equal("hello world", @client.hello("world"))
|
79
79
|
@client.return_response_as_xml = true
|
80
80
|
xml = @client.hello("world")
|
81
|
-
|
81
|
+
assert_xml_equal(RESPONSE_AS_XML, xml, [RESPONSE_AS_XML, xml].join("\n\n"))
|
82
82
|
doc = REXML::Document.new(@client.hello("world"))
|
83
83
|
assert_equal("hello world",
|
84
84
|
REXML::XPath.match(doc, "//*[name()='return']")[0].text)
|
data/test/soap/test_styleuse.rb
CHANGED
data/test/testutil.rb
CHANGED
@@ -4,11 +4,11 @@ module TestUtil
|
|
4
4
|
begin
|
5
5
|
# avoid 'already initialized constant FizzBuzz' warning
|
6
6
|
silent do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
7
|
+
$:.unshift(dir)
|
8
|
+
features.each do |feature|
|
9
|
+
Kernel.require feature
|
11
10
|
end
|
11
|
+
$:.shift
|
12
12
|
end
|
13
13
|
ensure
|
14
14
|
features.each do |feature|
|