Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1582

Show
Ignore:
Timestamp:
07/20/05 18:38:51 (3 years ago)
Author:
nahi
Message:

Array of a element which has simpleType causes a crash. closes #128.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/wsdl/soap/complexType.rb

    r1581 r1582  
    107107      end 
    108108      if check_array_content(complexcontent.content) 
    109         return complexcontent.content.elements[0].type 
     109        return element_simpletype(complexcontent.content.elements[0]) 
    110110      end 
    111111    elsif check_array_content(content) 
    112       return content.elements[0].type 
     112      return element_simpletype(content.elements[0]) 
    113113    end 
    114114    raise RuntimeError.new("Assert: Unknown array definition.") 
     
    131131private 
    132132 
     133  def element_simpletype(element) 
     134    if element.type 
     135      element.type  
     136    elsif element.local_simpletype 
     137      element.local_simpletype.base 
     138    else 
     139      nil 
     140    end 
     141  end 
     142 
    133143  def check_array_content(content) 
    134144    content and content.elements.size == 1 and