1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/soap/generator.rb: better XML pretty printing.

* lib/soap/encodingstyle/soapHandler.rb: remove unnecessary namespace
  assignment in the element which has "encodingStyle" attribute, and add
  necessary namespace assignment for "arrayType" attribute.

* test/soap/calc/test_calc_cgi.rb: take over $DEBUG to ruby process through CGI.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2003-10-30 14:25:21 +00:00
parent 1a4c78d7c1
commit 7eb52a8cd5
4 changed files with 24 additions and 9 deletions

View file

@ -1,3 +1,14 @@
Thu Oct 30 23:19:11 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/soap/generator.rb: better XML pretty printing.
* lib/soap/encodingstyle/soapHandler.rb: remove unnecessary namespace
assignment in the element which has "encodingStyle" attribute, and
add necessary namespace assignment for "arrayType" attribute.
* test/soap/calc/test_calc_cgi.rb: take over $DEBUG to ruby process
through CGI.
Thu Oct 30 22:59:39 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net> Thu Oct 30 22:59:39 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
* ext/syck/yaml2byte.c: HASH const too long. Thanks, matz. * ext/syck/yaml2byte.c: HASH const too long. Thanks, matz.
@ -22,7 +33,7 @@ Thu Oct 30 13:23:39 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Thu Oct 30 10:14:51 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org> Thu Oct 30 10:14:51 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/test/unit/autorunner.rb: make fox runners work. * lib/test/unit/autorunner.rb: make fox runner work.
Thu Oct 30 09:32:26 2003 NAKAMURA Usaku <usa@ruby-lang.org> Thu Oct 30 09:32:26 2003 NAKAMURA Usaku <usa@ruby-lang.org>

View file

@ -293,7 +293,6 @@ private
if !parent || parent.encodingstyle != EncodingNamespace if !parent || parent.encodingstyle != EncodingNamespace
if @generate_explicit_type if @generate_explicit_type
SOAPGenerator.assign_ns(attrs, ns, EnvelopeNamespace) SOAPGenerator.assign_ns(attrs, ns, EnvelopeNamespace)
SOAPGenerator.assign_ns(attrs, ns, EncodingNamespace)
attrs[ns.name(AttrEncodingStyleName)] = EncodingNamespace attrs[ns.name(AttrEncodingStyleName)] = EncodingNamespace
end end
data.encodingstyle = EncodingNamespace data.encodingstyle = EncodingNamespace
@ -309,6 +308,7 @@ private
if data.arytype.namespace if data.arytype.namespace
SOAPGenerator.assign_ns(attrs, ns, data.arytype.namespace) SOAPGenerator.assign_ns(attrs, ns, data.arytype.namespace)
end end
SOAPGenerator.assign_ns(attrs, ns, EncodingNamespace)
attrs[ns.name(AttrArrayTypeName)] = ns.name(create_arytype(ns, data)) attrs[ns.name(AttrArrayTypeName)] = ns.name(create_arytype(ns, data))
if data.type.name if data.type.name
attrs[ns.name(XSD::AttrTypeName)] = ns.name(data.type) attrs[ns.name(XSD::AttrTypeName)] = ns.name(data.type)

View file

@ -145,14 +145,17 @@ public
end end
def encode_tag(elename, attrs = nil) def encode_tag(elename, attrs = nil)
if attrs if !attrs or attrs.empty?
@buf << "\n#{ @indent }<#{ elename }" <<
attrs.collect { |key, value|
%Q[ #{ key }="#{ value }"]
}.join <<
'>'
else
@buf << "\n#{ @indent }<#{ elename }>" @buf << "\n#{ @indent }<#{ elename }>"
elsif attrs.size == 1
key, value = attrs.shift
@buf << %Q[\n#{ @indent }<#{ elename } #{ key }="#{ value }">]
else
@buf << "\n#{ @indent }<#{ elename } " <<
attrs.collect { |key, value|
%Q[#{ key }="#{ value }"]
}.join("\n#{ @indent } ") <<
'>'
end end
end end

View file

@ -15,6 +15,7 @@ class TestCalcCGI < Test::Unit::TestCase
Config::CONFIG["bindir"], Config::CONFIG["bindir"],
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"] Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]
) )
RUBYBIN << " -d" if $DEBUG
Port = 17171 Port = 17171