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.
Files changed (150) hide show
  1. data/bin/wsdl2ruby.rb +1 -0
  2. data/bin/xsd2ruby.rb +1 -1
  3. data/lib/soap/baseData.rb +1 -1
  4. data/lib/soap/element.rb +0 -2
  5. data/lib/soap/generator.rb +1 -2
  6. data/lib/soap/mapping/encodedregistry.rb +1 -0
  7. data/lib/soap/mapping/factory.rb +2 -2
  8. data/lib/soap/mapping/mapping.rb +3 -4
  9. data/lib/soap/mapping/registry.rb +0 -15
  10. data/lib/soap/mapping/rubytypeFactory.rb +0 -1
  11. data/lib/soap/mapping/wsdlencodedregistry.rb +1 -1
  12. data/lib/soap/mimemessage.rb +1 -0
  13. data/lib/soap/nestedexception.rb +1 -1
  14. data/lib/soap/netHttpClient.rb +4 -4
  15. data/lib/soap/ns.rb +4 -0
  16. data/lib/soap/property.rb +21 -15
  17. data/lib/soap/rpc/element.rb +1 -1
  18. data/lib/soap/rpc/standaloneServer.rb +1 -1
  19. data/lib/soap/soap.rb +4 -2
  20. data/lib/soap/streamHandler.rb +1 -1
  21. data/lib/soap/version.rb +8 -0
  22. data/lib/soap/wsdlDriver.rb +2 -2
  23. data/lib/wsdl/parser.rb +4 -4
  24. data/lib/wsdl/soap/classDefCreatorSupport.rb +1 -1
  25. data/lib/wsdl/soap/clientSkeltonCreator.rb +4 -2
  26. data/lib/wsdl/soap/driverCreator.rb +4 -2
  27. data/lib/wsdl/soap/methodDefCreator.rb +1 -1
  28. data/lib/wsdl/soap/servantSkeltonCreator.rb +4 -2
  29. data/lib/wsdl/soap/wsdl2ruby.rb +1 -1
  30. data/lib/wsdl/xmlSchema/parser.rb +4 -4
  31. data/lib/wsdl/xmlSchema/xsd2ruby.rb +1 -1
  32. data/lib/xsd/charset.rb +4 -3
  33. data/lib/xsd/codegen/gensupport.rb +8 -5
  34. data/lib/xsd/datatypes.rb +6 -6
  35. data/lib/xsd/ns.rb +1 -1
  36. data/lib/xsd/qname.rb +2 -2
  37. data/lib/xsd/xmlparser.rb +11 -17
  38. data/lib/xsd/xmlparser/libxmlparser.rb +6 -10
  39. data/test/helper.rb +6 -0
  40. data/test/soap/asp.net/test_aspdotnet.rb +3 -3
  41. data/test/soap/auth/test_basic.rb +2 -2
  42. data/test/soap/auth/test_digest.rb +2 -2
  43. data/test/soap/calc/server.cgi +2 -0
  44. data/test/soap/calc/test_calc.rb +3 -2
  45. data/test/soap/calc/test_calc2.rb +3 -2
  46. data/test/soap/calc/test_calc_cgi.rb +1 -1
  47. data/test/soap/case/test_mapping.rb +2 -2
  48. data/test/soap/fault/test_customfault.rb +1 -1
  49. data/test/soap/fault/test_fault.rb +1 -1
  50. data/test/soap/fault/test_soaparray.rb +1 -1
  51. data/test/soap/filter/test_filter.rb +1 -1
  52. data/test/soap/header/server.cgi +1 -0
  53. data/test/soap/header/test_authheader.rb +1 -1
  54. data/test/soap/header/test_authheader_cgi.rb +1 -1
  55. data/test/soap/header/test_simplehandler.rb +1 -1
  56. data/test/soap/helloworld/test_helloworld.rb +3 -2
  57. data/test/soap/literalArrayMapping/test_definedarray.rb +2 -2
  58. data/test/soap/marshal/marshaltestlib.rb +5 -2
  59. data/test/soap/marshal/test_digraph.rb +1 -1
  60. data/test/soap/marshal/test_marshal.rb +3 -2
  61. data/test/soap/marshal/test_struct.rb +1 -1
  62. data/test/soap/ssl/sslsvr.rb +1 -0
  63. data/test/soap/ssl/test_ssl.rb +1 -1
  64. data/test/soap/struct/test_struct.rb +2 -2
  65. data/test/soap/swa/test_file.rb +1 -1
  66. data/test/soap/test_basetype.rb +1 -1
  67. data/test/soap/test_cookie.rb +2 -2
  68. data/test/soap/test_custom_ns.rb +4 -4
  69. data/test/soap/test_custommap.rb +1 -1
  70. data/test/soap/test_empty.rb +6 -6
  71. data/test/soap/test_envelopenamespace.rb +2 -2
  72. data/test/soap/test_extraattr.rb +2 -2
  73. data/test/soap/test_generator.rb +5 -3
  74. data/test/soap/test_httpconfigloader.rb +1 -1
  75. data/test/soap/test_mapping.rb +1 -1
  76. data/test/soap/test_nestedexception.rb +28 -14
  77. data/test/soap/test_nil.rb +23 -28
  78. data/test/soap/test_no_indent.rb +3 -3
  79. data/test/soap/test_property.rb +2 -2
  80. data/test/soap/test_response_as_xml.rb +4 -4
  81. data/test/soap/test_soapelement.rb +1 -1
  82. data/test/soap/test_streamhandler.rb +2 -2
  83. data/test/soap/test_styleuse.rb +2 -2
  84. data/test/soap/wsdlDriver/test_calc.rb +2 -2
  85. data/test/soap/wsdlDriver/test_document.rb +2 -2
  86. data/test/soap/wsdlDriver/test_simpletype.rb +3 -2
  87. data/test/testutil.rb +4 -4
  88. data/test/wsdl/abstract/test_abstract.rb +2 -2
  89. data/test/wsdl/anonymous/test_anonymous.rb +2 -2
  90. data/test/wsdl/any/test_any.rb +2 -2
  91. data/test/wsdl/axisArray/test_axisarray.rb +2 -2
  92. data/test/wsdl/choice/test_choice.rb +2 -2
  93. data/test/wsdl/complexcontent/test_echo.rb +2 -2
  94. data/test/wsdl/datetime/test_datetime.rb +3 -2
  95. data/test/wsdl/document/array/test_array.rb +2 -2
  96. data/test/wsdl/document/test_nosoapaction.rb +2 -2
  97. data/test/wsdl/document/test_number.rb +2 -2
  98. data/test/wsdl/document/test_rpc.rb +2 -2
  99. data/test/wsdl/fault/multifault.wsdl +8 -8
  100. data/test/wsdl/fault/test_fault.rb +3 -3
  101. data/test/wsdl/fault/test_multifault.rb +13 -13
  102. data/test/wsdl/group/test_rpc.rb +2 -2
  103. data/test/wsdl/list/test_list.rb +2 -2
  104. data/test/wsdl/map/test_map.rb +1 -1
  105. data/test/wsdl/marshal/test_wsdlmarshal.rb +3 -4
  106. data/test/wsdl/oneway/test_oneway.rb +2 -2
  107. data/test/wsdl/overload/test_overload.rb +2 -2
  108. data/test/wsdl/qualified/test_qualified.rb +4 -4
  109. data/test/wsdl/qualified/test_unqualified.rb +4 -4
  110. data/test/wsdl/raa/test_raa.rb +4 -4
  111. data/test/wsdl/ref/test_ref.rb +2 -2
  112. data/test/wsdl/rpc/test_rpc.rb +2 -2
  113. data/test/wsdl/rpc/test_rpc_lit.rb +18 -18
  114. data/test/wsdl/simplecontent/test_simplecontent.rb +2 -2
  115. data/test/wsdl/simpletype/rpc/test_rpc.rb +2 -2
  116. data/test/wsdl/simpletype/test_simpletype.rb +2 -2
  117. data/test/wsdl/soap/test_soapbodyparts.rb +1 -1
  118. data/test/wsdl/soap/wsdl2ruby/section/test_section.rb +2 -2
  119. data/test/wsdl/soap/wsdl2ruby/soapenc/test_soapenc.rb +2 -2
  120. data/test/wsdl/soap/wsdl2ruby/test_wsdl2ruby.rb +2 -2
  121. data/test/wsdl/soaptype/test_soaptype.rb +5 -5
  122. data/test/wsdl/test_emptycomplextype.rb +1 -1
  123. data/test/wsdl/test_fault.rb +1 -1
  124. data/test/wsdl/test_multiplefault.rb +1 -1
  125. data/test/xsd/codegen/test_classdef.rb +1 -1
  126. data/test/xsd/test_noencoding.rb +1 -1
  127. data/test/xsd/test_ns.rb +1 -1
  128. data/test/xsd/test_xmlschemaparser.rb +1 -1
  129. data/test/xsd/test_xsd.rb +1 -1
  130. data/test/xsd/xsd2ruby/test_xsd2ruby.rb +3 -3
  131. metadata +24 -33
  132. data/lib/soap/rpc/element.rb.orig +0 -378
  133. data/lib/soap/ruby18ext.rb +0 -13
  134. data/lib/xsd/xmlparser.rb.orig +0 -110
  135. data/test/results +0 -4810
  136. data/test/soap/header/session.pstoredb +0 -0
  137. data/test/wsdl/marshal/Person.rb +0 -1
  138. data/test/wsdl/simpletype/rpc/echo_version.rb +0 -1
  139. data/test/wsdl/simpletype/rpc/echo_versionDriver.rb +0 -10
  140. data/test/wsdl/simpletype/rpc/echo_versionMappingRegistry.rb +0 -4
  141. data/test/wsdl/simpletype/rpc/echo_versionServant.rb +0 -3
  142. data/test/wsdl/simpletype/rpc/echo_version_service.rb +0 -3
  143. data/test/wsdl/simpletype/rpc/echo_version_serviceClient.rb +0 -34
  144. data/test/wsdl/soap/wsdl2ruby/echo_version.rb +0 -1
  145. data/test/wsdl/soap/wsdl2ruby/echo_versionDriver.rb +0 -10
  146. data/test/wsdl/soap/wsdl2ruby/echo_versionMappingRegistry.rb +0 -4
  147. data/test/wsdl/soap/wsdl2ruby/echo_versionServant.rb +0 -3
  148. data/test/wsdl/soap/wsdl2ruby/echo_version_service.cgi +0 -3
  149. data/test/wsdl/soap/wsdl2ruby/echo_version_service.rb +0 -7
  150. data/test/wsdl/soap/wsdl2ruby/echo_version_serviceClient.rb +0 -34
@@ -49,7 +49,7 @@ private
49
49
  end
50
50
 
51
51
  def create_file
52
- @modulepath = Array(@opt['module_path'])
52
+ @modulepath = @opt['module_path']
53
53
  create_classdef if @opt.key?('classdef')
54
54
  create_mapping_registry if @opt.key?('mapping_registry')
55
55
  create_mapper if @opt.key?('mapper')
data/lib/xsd/charset.rb CHANGED
@@ -10,7 +10,7 @@ module XSD
10
10
 
11
11
 
12
12
  module Charset
13
- @internal_encoding = "UTF8" #$KCODE
13
+ @internal_encoding = (RUBY_VERSION.to_f >= 1.9) ? 'UTF8' : $KCODE
14
14
 
15
15
  class XSDError < StandardError; end
16
16
  class CharsetError < XSDError; end
@@ -129,7 +129,7 @@ public
129
129
 
130
130
  # us_ascii = '[\x00-\x7F]'
131
131
  us_ascii = '[\x9\xa\xd\x20-\x7F]' # XML 1.0 restricted.
132
- USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z")
132
+ USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z", nil, 'n')
133
133
 
134
134
  twobytes_euc = '(?:[\x8E\xA1-\xFE][\xA1-\xFE])'
135
135
  threebytes_euc = '(?:\x8F[\xA1-\xFE][\xA1-\xFE])'
@@ -149,7 +149,8 @@ public
149
149
  threebytes_utf8 = '(?:[\xE0-\xEF][\x80-\xBF][\x80-\xBF])'
150
150
  # 11110uuu 10uuuzzz 10yyyyyy 10xxxxxx
151
151
  fourbytes_utf8 = '(?:[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])'
152
- character_utf8 = "(?:#{us_ascii}|#{twobytes_utf8}|#{threebytes_utf8}|#{fourbytes_utf8})"
152
+ character_utf8 =
153
+ "(?:#{us_ascii}|#{twobytes_utf8}|#{threebytes_utf8}|#{fourbytes_utf8})"
153
154
  UTF8Regexp = Regexp.new("\\A#{character_utf8}*\\z", nil, 'n')
154
155
 
155
156
  def Charset.is_us_ascii(str)
@@ -227,7 +227,7 @@ module GenSupport
227
227
  str = trim_eol(str)
228
228
  str = trim_indent(str)
229
229
  if indent
230
- str.gsub(/^/, " " * indent)
230
+ str.to_s.gsub(/^/, " " * indent)
231
231
  else
232
232
  str
233
233
  end
@@ -236,22 +236,25 @@ module GenSupport
236
236
  private
237
237
 
238
238
  def trim_eol(str)
239
- str.lines.collect { |line|
239
+ str = str.lines if str.respond_to?(:lines) # RubyJedi: compatible with Ruby 1.8.6 and above
240
+ str.collect { |line|
240
241
  line.sub(/\r?\n\z/, "") + "\n"
241
242
  }.join
242
243
  end
243
244
 
244
245
  def trim_indent(str)
245
246
  indent = nil
246
- str = str.lines.collect { |line| untab(line) }.join
247
- str.each_line do |line|
247
+ str = str.lines if str.respond_to?(:lines) # RubyJedi: compatible with Ruby 1.8.6 and above
248
+ str = str.collect { |line| untab(line) }.join
249
+ str = str.lines if str.respond_to?(:lines) # RubyJedi: compatible with Ruby 1.8.6 and above
250
+ str.each do |line|
248
251
  head = line.index(/\S/)
249
252
  if !head.nil? and (indent.nil? or head < indent)
250
253
  indent = head
251
254
  end
252
255
  end
253
256
  return str unless indent
254
- str.lines.collect { |line|
257
+ str.collect { |line|
255
258
  line.sub(/^ {0,#{indent}}/, "")
256
259
  }.join
257
260
  end
data/lib/xsd/datatypes.rb CHANGED
@@ -631,7 +631,7 @@ private
631
631
  if secfrac
632
632
  diffday = secfrac.to_i.to_r / (10 ** secfrac.size) / DayInSec
633
633
  data += diffday
634
- # FYI: new0 and jd_to_rjd are not necessary to use if you don't have
634
+ # FYI: new! and jd_to_rjd are not necessary to use if you don't have
635
635
  # exceptional reason.
636
636
  end
637
637
  [data, secfrac]
@@ -647,14 +647,14 @@ private
647
647
 
648
648
  def _to_s
649
649
  year = (@data.year > 0) ? @data.year : @data.year - 1
650
- s = format('%.4d-%02d-%02dT%02d:%02d:%02d',
651
- year, @data.mon, @data.mday, @data.hour, @data.min, @data.sec)
650
+ s = format('%.4d-%02d-%02dT%02d:%02d:%02d', year, @data.mon, @data.mday, @data.hour, @data.min, @data.sec)
652
651
  if @data.sec_fraction.nonzero?
653
652
  if @secfrac
654
- s << ".#{ @secfrac }"
653
+ s << ".#{ @secfrac }"
654
+ elsif (RUBY_VERSION.to_f >= 1.9) # RubyJedi: Ruby 1.9's DateTime.sec_fraction() appears to be more 'sane' and doesn't need to be multiplied.
655
+ s << sprintf("%.16f", @data.sec_fraction.to_f).sub(/^0/, '').sub(/0*$/, '')
655
656
  else
656
- s << sprintf("%.16f",
657
- (@data.sec_fraction * DayInSec).to_f).sub(/^0/, '').sub(/0*$/, '')
657
+ s << sprintf("%.16f",(@data.sec_fraction * DayInSec).to_f).sub(/^0/, '').sub(/0*$/, '')
658
658
  end
659
659
  end
660
660
  add_tz(s)
data/lib/xsd/ns.rb CHANGED
@@ -123,7 +123,7 @@ public
123
123
  end
124
124
 
125
125
  # $1 and $2 are necessary.
126
- ParseRegexp = Regexp.new('\A([^:]+)(?::(.+))?\z')
126
+ ParseRegexp = Regexp.new('\A([^:]+)(?::(.+))?\z', nil, 'n')
127
127
 
128
128
  def parse(str, local = false)
129
129
  if ParseRegexp =~ str
data/lib/xsd/qname.rb CHANGED
@@ -15,8 +15,8 @@ class QName
15
15
  attr_accessor :source
16
16
 
17
17
  def initialize(namespace = nil, name = nil)
18
- @namespace = namespace
19
- @name = name
18
+ @namespace = namespace ? namespace.to_s : nil
19
+ @name = name ? name.to_s : nil
20
20
  @source = nil
21
21
  end
22
22
 
data/lib/xsd/xmlparser.rb CHANGED
@@ -7,7 +7,6 @@
7
7
 
8
8
 
9
9
  require 'xsd/xmlparser/parser'
10
- require 'soap/property'
11
10
 
12
11
 
13
12
  module XSD
@@ -20,7 +19,7 @@ module XMLParser
20
19
  module_function :create_parser
21
20
 
22
21
  # $1 is necessary.
23
- NSParseRegexp = Regexp.new("^xmlns:?(.*)$")
22
+ NSParseRegexp = Regexp.new('^xmlns:?(.*)$', nil, 'n')
24
23
 
25
24
  def filter_ns(ns, attrs)
26
25
  ns_updated = false
@@ -51,26 +50,21 @@ end
51
50
  end
52
51
 
53
52
 
54
- PARSER_LIBS = [
55
- 'nokogiri',
56
- 'libxmlparser',
57
- 'xmlparser',
58
- 'xmlscanner',
59
- 'rexmlparser'
60
- ]
61
- # Get library prefs
62
- opt = ::SOAP::Property.loadproperty('soap/property')
63
- use_libxml = (opt and opt['parser'] and opt['parser']['use_libxml'] and opt['parser']['use_libxml'] == 'false') ? false : true
64
53
  # Try to load XML processor.
65
54
  loaded = false
66
- PARSER_LIBS.each do |name|
55
+ [
56
+ 'nokogiri',
57
+ # 'libxmlparser',
58
+ # 'xmlparser',
59
+ # 'xmlscanner',
60
+ 'rexmlparser',
61
+ ].each do |name|
67
62
  begin
68
- lib = "xsd/xmlparser/#{name}"
69
- require lib unless !use_libxml && name == 'libxmlparser'
63
+ require "xsd/xmlparser/#{name}"
70
64
  # XXX: for a workaround of rubygems' require inconsistency
71
65
  # XXX: MUST BE REMOVED IN THE FUTURE
72
66
  raise LoadError unless XSD::XMLParser.constants.find { |c|
73
- c.to_s.downcase == name.downcase
67
+ c.to_s.downcase == name
74
68
  }
75
69
  loaded = true
76
70
  break
@@ -79,4 +73,4 @@ PARSER_LIBS.each do |name|
79
73
  end
80
74
  unless loaded
81
75
  raise RuntimeError.new("XML processor module not found.")
82
- end
76
+ end
@@ -25,11 +25,12 @@ class LibXMLParser < XSD::XMLParser::Parser
25
25
  end
26
26
  # XMLParser passes a String in utf-8.
27
27
  @charset = 'utf-8'
28
- @parser = XML::SaxParser.string(string)
28
+ @parser = XML::SaxParser.new
29
29
  @parser.callbacks = self
30
+ @parser.string = string
30
31
  @parser.parse
31
32
  end
32
-
33
+
33
34
  ENTITY_REF_MAP = {
34
35
  'lt' => '<',
35
36
  'gt' => '>',
@@ -61,14 +62,9 @@ class LibXMLParser < XSD::XMLParser::Parser
61
62
  #def on_end_document()
62
63
  # nil
63
64
  #end
64
-
65
- def on_start_element_ns(name, attributes, prefix, uri, namespaces)
66
- name = "#{prefix}:#{name}" unless prefix.nil?
67
- namespaces.each do |key,value|
68
- nsprefix = key.nil? ? "xmlns" : "xmlns:#{key}"
69
- attributes[nsprefix] = value
70
- end
71
- start_element(name, attributes)
65
+
66
+ def on_start_element(name, attr_hash)
67
+ start_element(name, attr_hash)
72
68
  end
73
69
 
74
70
  def on_end_element(name)
data/test/helper.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'test/unit'
2
+ require 'rubygems'
3
+ require 'test/unit/xml' ## RubyJedi
4
+
5
+ ENV['DEBUG_SOAP4R'] = 'true' ## Needed to force wsdl2ruby.rb and xsd2ruby.rb to use DEVELOPMENT soap4r libs instead of installed soap4r libs
6
+ $DEBUG = !!ENV['WIREDUMPS']
@@ -1,7 +1,7 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/rpc/standaloneServer'
3
4
  require 'soap/rpc/driver'
4
- require File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'testutil.rb')
5
5
 
6
6
 
7
7
  module SOAP; module ASPDotNet
@@ -108,7 +108,7 @@ __XML__
108
108
  @client.add_method_with_soapaction('sayHello', Server::Namespace + 'SayHello', 'name')
109
109
  @client.default_encodingstyle = SOAP::EncodingStyle::ASPDotNetHandler::Namespace
110
110
  assert_equal("Hello Mike", @client.sayHello("Mike"))
111
- assert_equal(REQUEST_ASPDOTNETHANDLER, parse_requestxml(str),
111
+ assert_xml_equal(REQUEST_ASPDOTNETHANDLER, parse_requestxml(str),
112
112
  [REQUEST_ASPDOTNETHANDLER, parse_requestxml(str)].join("\n\n"))
113
113
  end
114
114
 
@@ -1,9 +1,9 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/rpc/driver'
3
4
  require 'webrick'
4
5
  require 'webrick/httpproxy'
5
6
  require 'logger'
6
- require File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'testutil.rb')
7
7
 
8
8
 
9
9
  module SOAP; module Auth
@@ -1,9 +1,9 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/rpc/driver'
3
4
  require 'webrick'
4
5
  require 'webrick/httpproxy'
5
6
  require 'logger'
6
- require File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'testutil.rb')
7
7
 
8
8
 
9
9
  module SOAP; module Auth
@@ -1,3 +1,5 @@
1
+ $:.unshift File.expand_path(File.dirname(__FILE__)+'/../../../lib')
2
+ $:.unshift '.' if RUBY_VERSION.to_f >= 1.9
1
3
  require 'soap/rpc/cgistub'
2
4
 
3
5
  class CalcServer < SOAP::RPC::CGIStub
@@ -1,6 +1,7 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/rpc/driver'
3
- require 'server.rb'
4
+ TestUtil.require(File.dirname(__FILE__), 'server.rb')
4
5
 
5
6
 
6
7
  module SOAP
@@ -1,6 +1,7 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/rpc/driver'
3
- require 'server2.rb'
4
+ TestUtil.require(File.dirname(__FILE__), 'server2.rb')
4
5
 
5
6
 
6
7
  module SOAP
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/rpc/driver'
3
3
  require 'logger'
4
4
  require 'webrick'
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/marshal'
3
3
 
4
4
 
@@ -49,7 +49,7 @@ class TestMapping < Test::Unit::TestCase
49
49
  </env:Envelope>
50
50
  __XML__
51
51
  o = TTMHeader.new("dsn", "password", "schema", "username")
52
- assert_equal(dump, SOAP::Marshal.dump(o))
52
+ assert_xml_equal(dump, SOAP::Marshal.dump(o))
53
53
  end
54
54
  end
55
55
 
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/rpc/driver'
3
3
  require 'soap/rpc/standaloneServer'
4
4
 
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/rpc/driver'
3
3
  require 'soap/rpc/standaloneServer'
4
4
 
@@ -1,7 +1,7 @@
1
+ require 'helper'
1
2
  require 'soap/rpc/router'
2
3
  require 'soap/mapping/mapping'
3
4
  require 'soap/processor'
4
- require 'test/unit'
5
5
 
6
6
 
7
7
  module SOAP
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/rpc/driver'
3
3
  require 'soap/rpc/standaloneServer'
4
4
  require 'soap/filter'
@@ -1,3 +1,4 @@
1
+ $:.unshift File.expand_path(File.dirname(__FILE__)+'/../../../lib')
1
2
  require 'pstore'
2
3
  require 'soap/rpc/cgistub'
3
4
  require 'soap/header/simplehandler'
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/rpc/driver'
3
3
  require 'soap/rpc/standaloneServer'
4
4
  require 'soap/header/simplehandler'
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/rpc/driver'
3
3
  require 'soap/rpc/standaloneServer'
4
4
  require 'soap/header/simplehandler'
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/rpc/driver'
3
3
  require 'soap/rpc/standaloneServer'
4
4
  require 'soap/header/simplehandler'
@@ -1,6 +1,7 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/rpc/driver'
3
- require 'hw_s.rb'
4
+ TestUtil.require(File.dirname(__FILE__), 'hw_s.rb')
4
5
 
5
6
 
6
7
  module SOAP
@@ -1,8 +1,8 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/mapping'
3
4
  require 'soap/processor'
4
5
  require 'soap/rpc/element'
5
- require File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'testutil.rb')
6
6
 
7
7
 
8
8
  module SOAP
@@ -26,12 +26,15 @@ module MarshalTestLib
26
26
  msg = msg ? msg + "(#{ caller[0] })" : caller[0]
27
27
  o2 = marshaltest(o1)
28
28
  assert_equal(o1.class, o2.class, msg)
29
+
29
30
  iv1 = o1.instance_variables.sort
30
31
  iv2 = o2.instance_variables.sort
31
32
  assert_equal(iv1, iv2)
32
- val1 = iv1.map {|var| o1.instance_eval {eval var}}
33
- val2 = iv1.map {|var| o2.instance_eval {eval var}}
33
+
34
+ val1 = iv1.map {|var| o1.instance_eval( "#{var}" )}
35
+ val2 = iv1.map {|var| o2.instance_eval( "#{var}" )}
34
36
  assert_equal(val1, val2, msg)
37
+
35
38
  if block_given?
36
39
  assert_equal(yield(o1), yield(o2), msg)
37
40
  else
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'helper'
2
2
  require 'soap/marshal'
3
3
 
4
4
 
@@ -1,6 +1,7 @@
1
- require 'test/unit'
1
+ require 'helper'
2
+ require 'testutil'
2
3
  require 'soap/marshal'
3
- require File.join(File.dirname(File.expand_path(__FILE__)), 'marshaltestlib')
4
+ TestUtil.require(File.dirname(__FILE__), 'marshaltestlib')
4
5
 
5
6
 
6
7
  if RUBY_VERSION > "1.7.0"