Changeset 1044
- Timestamp:
- 11/13/03 23:52:41 (5 years ago)
- Files:
-
- trunk/lib/wsdl/soap/complexType.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/wsdl/soap/complexType.rb
r934 r1044 32 32 def check_type 33 33 if content 34 :TYPE_STRUCT 34 if content.elements.size == 1 and content.elements[0].maxoccurs != 1 35 :TYPE_ARRAY 36 else 37 :TYPE_STRUCT 38 end 35 39 elsif complexcontent and complexcontent.base == ::SOAP::ValueArrayName 36 40 :TYPE_ARRAY … … 71 75 72 76 def find_arytype 73 complexcontent.attributes.each do |attribute| 74 if attribute.ref == ::SOAP::AttrArrayTypeName 75 return attribute.arytype 77 unless compoundtype == :TYPE_ARRAY 78 raise RuntimeError.new("Assert: not for array") 79 end 80 if complexcontent 81 complexcontent.attributes.each do |attribute| 82 if attribute.ref == ::SOAP::AttrArrayTypeName 83 return attribute.arytype 84 end 76 85 end 86 elsif content.elements.size == 1 and content.elements[0].maxoccurs != 1 87 return content.elements[0].type 88 else 89 raise RuntimeError.new("Assert: Unknown array definition.") 77 90 end 78 91 nil … … 82 95 83 96 def content_arytype 84 unless compoundtype == :TYPE_ARRAY85 raise RuntimeError.new("Assert: not for array")86 end87 97 arytype = find_arytype 88 98 ns = arytype.namespace