diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 05:53:16 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 05:53:16 +0000 |
commit | aad1e0d556767a2cb90eeca94bb3f09bc999f891 (patch) | |
tree | 3ddde51774247d839f4e12ae0d9af6ff2e84d35b /lib/wsdl/soap | |
parent | e8c4ea0157fb9fb9647572f9fcb378d19aeb0618 (diff) | |
download | ruby-aad1e0d556767a2cb90eeca94bb3f09bc999f891.tar.gz ruby-aad1e0d556767a2cb90eeca94bb3f09bc999f891.tar.xz ruby-aad1e0d556767a2cb90eeca94bb3f09bc999f891.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@5045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/wsdl/soap')
-rw-r--r-- | lib/wsdl/soap/complexType.rb | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/lib/wsdl/soap/complexType.rb b/lib/wsdl/soap/complexType.rb index e9818faa9..34fc18f1a 100644 --- a/lib/wsdl/soap/complexType.rb +++ b/lib/wsdl/soap/complexType.rb @@ -48,13 +48,22 @@ class ComplexType < Info end def child_defined_complextype(name) - unless compoundtype == :TYPE_STRUCT - raise RuntimeError.new("Assert: not for struct") - end - unless ele = find_element(name) - if name.namespace.nil? - ele = find_element_by_name(name.name) + ele = nil + case compoundtype + when :TYPE_STRUCT + unless ele = find_element(name) + if name.namespace.nil? + ele = find_element_by_name(name.name) + end end + when :TYPE_ARRAY + if content.elements.size == 1 + ele = content.elements[0] + else + raise RuntimeError.new("Assert: must not reach.") + end + else + raise RuntimeError.new("Assert: Not implemented.") end unless ele raise RuntimeError.new("Cannot find #{name} as a children of #{@name}.") @@ -83,10 +92,13 @@ class ComplexType < Info private def content_arytype - arytype = find_arytype - ns = arytype.namespace - name = arytype.name.sub(/\[(?:,)*\]$/, '') - XSD::QName.new(ns, name) + if arytype = find_arytype + ns = arytype.namespace + name = arytype.name.sub(/\[(?:,)*\]$/, '') + XSD::QName.new(ns, name) + else + nil + end end end |