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

Changeset 1911

Show
Ignore:
Timestamp:
08/05/07 00:06:28 (1 year ago)
Author:
nahi
Message:
  • do not raise warning when there's a simpleType definition which have non-enumeration restriction. Generated mapping registry wrongly contains references to undefined classes. closes #399.
Files:

Legend:

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

    r1906 r1911  
    142142  def dump_simpletypedef_restriction(qname, typedef, qualified) 
    143143    restriction = typedef.restriction 
    144     if restriction.enumeration.empty
     144    unless restriction.enumeration
    145145      # not supported.  minlength? 
    146146      return nil 
  • trunk/lib/wsdl/soap/classDefCreatorSupport.rb

    r1895 r1911  
    108108    if element.type == XSD::AnyTypeName 
    109109      nil 
    110     elsif @simpletypes[element.type] 
    111       create_class_name(element.type, @modulepath) 
     110    elsif simpletype = @simpletypes[element.type] 
     111      if simpletype.restriction and simpletype.restriction.enumeration? 
     112        create_class_name(element.type, @modulepath) 
     113      else 
     114        nil 
     115      end 
    112116    elsif klass = element_basetype(element) 
    113117      klass.name 
  • trunk/lib/wsdl/soap/mappingRegistryCreatorSupport.rb

    r1906 r1911  
    224224  def dump_simpletypedef_restriction(qname, typedef, as_element, qualified) 
    225225    restriction = typedef.restriction 
    226     if restriction.enumeration.empty
     226    unless restriction.enumeration
    227227      # not supported.  minlength? 
    228228      return nil 
  • trunk/lib/wsdl/xmlSchema/simpleRestriction.rb

    r1905 r1911  
    5151    return false unless check_pattern(value) 
    5252    true 
     53  end 
     54 
     55  def enumeration? 
     56    !@enumeration.empty? 
    5357  end 
    5458