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

* lib/soap/streamHandler.rb: drop unused http parameters.

* lib/soap/encodingstyle/soapHandler.rb, lib/soap/mapping/factory.rb,
  lib/soap/mapping/mapping.rb, lib/soap/mapping/registry.rb,
  lib/wsdl/soap/complexType.rb: ApacheSOAP's map support was broken under WSDL
  dynanic client environment.  fixed.

* test/wsdl/raa/*: add tests.

* lib/xsd/datatypes.rb: dateTime precision bug fix (at least, I hope.)  bug of
  soap4r.  XSDDateTimeImple.to_time passed a Float to Time.local/Time.gm as an
  usec, and NUM2LONG(rb_num2long for Float) causes rounding error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2003-11-28 05:53:16 +00:00
parent a017b0cc8a
commit 42bca643c3
18 changed files with 256 additions and 95 deletions

View file

@ -34,11 +34,9 @@ RubyIVarName = XSD::QName.new(RubyTypeInstanceNamespace, 'ivars')
# Inner class to pass an exception.
class SOAPException; include Marshallable
attr_reader :excn_type_name, :message, :backtrace, :cause
attr_reader :excn_type_name, :cause
def initialize(e)
@excn_type_name = Mapping.name2elename(e.class.to_s)
@message = e.message
@backtrace = e.backtrace
@cause = e
end
@ -50,25 +48,15 @@ class SOAPException; include Marshallable
klass = Mapping.class_from_name(
Mapping.elename2name(@excn_type_name.to_s))
if klass.nil?
raise RuntimeError.new(@message)
raise RuntimeError.new(@cause.message)
end
unless klass <= ::Exception
raise NameError.new
end
obj = klass.new(@message)
obj = klass.new(@cause.message)
obj.extend(::SOAP::Mapping::MappedException)
obj
end
def set_backtrace(e)
e.set_backtrace(
if @backtrace.is_a?(Array)
@backtrace
else
[@backtrace.inspect]
end
)
end
end
@ -238,10 +226,12 @@ class Registry
[::String, ::SOAP::SOAPGMonth, BasetypeFactory],
[::String, ::SOAP::SOAPQName, BasetypeFactory],
[::Hash, ::SOAP::SOAPArray, HashFactory],
[::Hash, ::SOAP::SOAPStruct, HashFactory],
[::Array, ::SOAP::SOAPArray, ArrayFactory,
{:derived_class => true}],
[::Hash, ::SOAP::SOAPStruct, HashFactory],
[::SOAP::Mapping::SOAPException,
::SOAP::SOAPStruct, TypedStructFactory,
{:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}],
@ -282,10 +272,12 @@ class Registry
[::String, ::SOAP::SOAPGMonth, BasetypeFactory],
[::String, ::SOAP::SOAPQName, BasetypeFactory],
[::Hash, ::SOAP::SOAPArray, HashFactory],
[::Hash, ::SOAP::SOAPStruct, HashFactory],
# Does not allow Array's subclass here.
[::Array, ::SOAP::SOAPArray, ArrayFactory],
[::Hash, ::SOAP::SOAPStruct, HashFactory],
[::SOAP::Mapping::SOAPException,
::SOAP::SOAPStruct, TypedStructFactory,
{:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}],