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

Changeset 1077

Show
Ignore:
Timestamp:
11/29/03 15:05:27 (5 years ago)
Author:
nahi
Message:

* refactoring top level node decoding with WSDL.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/soap/encodingstyle/soapHandler.rb

    r1066 r1077  
    332332  def decode_tag_by_wsdl(ns, elename, typestr, parent, arytypestr, extraattr) 
    333333    o = nil 
    334     # should branch by root attribute? 
    335334    if parent.class == SOAPBody 
     335      # root element: should branch by root attribute? 
    336336      if @is_first_top_ele 
    337337        # Unqualified name is allowed here. 
     
    339339        type = @decode_typemap[elename] || 
    340340          @decode_typemap.find_name(elename.name) 
    341         unless type 
    342           raise EncodingStyleError.new("Unknown operation '#{ elename }'.") 
     341        if type 
     342          o = SOAPStruct.new(elename) 
     343          o.definedtype = type 
     344          return o 
    343345        end 
    344         o = SOAPStruct.new(elename) 
    345         o.definedtype = type 
    346         return o 
    347       elsif !typestr 
    348         # typeless multi-ref element. 
    349         return decode_tag_by_type(ns, elename, typestr, parent, arytypestr, 
    350           extraattr) 
    351       else 
    352         # typed multi-ref element. 
     346      end 
     347      # multi-ref element. 
     348      if typestr 
    353349        typename = ns.parse(typestr) 
    354350        typedef = @decode_typemap[typename] 
    355         return decode_defined_compoundtype(elename, typename, typedef, 
    356           arytypestr) 
    357       end 
     351        if typedef 
     352          return decode_defined_compoundtype(elename, typename, typedef, 
     353            arytypestr) 
     354        end 
     355      end 
     356      return decode_tag_by_type(ns, elename, typestr, parent, arytypestr, 
     357        extraattr) 
    358358    end 
    359359