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

Changeset 1959

Show
Ignore:
Timestamp:
09/14/07 19:56:50 (8 months ago)
Author:
nahi
Message:
  • wsdl2ruby.rb generated inconsistent class definition when the base class was :TYPE_ARRAY and the derived class was a :TYPE_STRUCT. let the derived class be a standalone (not a derived) class. closes #424.
Files:

Legend:

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

    r1954 r1959  
    239239    case type.compoundtype 
    240240    when :TYPE_STRUCT, :TYPE_EMPTY 
    241       create_classdef(mpath, qname, type, qualified) 
     241      create_structdef(mpath, qname, type, qualified) 
    242242    when :TYPE_ARRAY 
    243243      create_arraydef(mpath, qname, type) 
     
    253253  end 
    254254 
    255   def create_classdef(mpath, qname, typedef, qualified = false) 
     255  def create_structdef(mpath, qname, typedef, qualified = false) 
    256256    classname = mapped_class_basename(qname, mpath) 
    257257    baseclassname = nil 
    258258    if typedef.complexcontent 
    259259      if base = typedef.complexcontent.base 
    260         baseclassname = mapped_class_basename(base, mpath) 
     260        # :TYPE_ARRAY must not be derived (#424) 
     261        basedef = @complextypes[base] 
     262        if basedef and basedef.compoundtype != :TYPE_ARRAY 
     263          # baseclass should be a toplevel complexType 
     264          baseclassname = mapped_class_basename(base, @modulepath) 
     265        end 
    261266      end 
    262267    end 
  • trunk/lib/wsdl/xmlSchema/complexExtension.rb

    r1917 r1959  
    6464    if @base == ::SOAP::ValueArrayName 
    6565      :TYPE_ARRAY 
    66     elsif content 
     66    elsif content or !@attributes.empty? 
    6767      :TYPE_STRUCT 
    6868    else 
  • trunk/sample/soapheader/authheader/client.rb

    r1843 r1959  
    1919      { "sessionid" => @sessionid } 
    2020    else 
    21       { "userid" => @userid, "passwd" => @passwd } 
     21      #{ "userid" => @userid, "passwd" => @passwd } 
     22      passwd = SOAP::SOAPElement.new("Password", @passwd) 
     23      passwd.extraattr["Type"] = "type" 
     24      { "userid" => @userid, "Passwd" => passwd } 
    2225    end 
    2326  end