summaryrefslogtreecommitdiff
path: root/lib/wsdl
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-28 05:53:16 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-28 05:53:16 +0000
commit42bca643c3ec41782d519c7676383f8f71e67a7a (patch)
tree3ddde51774247d839f4e12ae0d9af6ff2e84d35b /lib/wsdl
parenta017b0cc8aea236600d47ff04cd829f84499f414 (diff)
* 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
Diffstat (limited to 'lib/wsdl')
-rw-r--r--lib/wsdl/soap/complexType.rb32
1 files changed, 22 insertions, 10 deletions
diff --git a/lib/wsdl/soap/complexType.rb b/lib/wsdl/soap/complexType.rb
index e9818faa9a..34fc18f1a4 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