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

Changeset 1624

Show
Ignore:
Timestamp:
09/15/05 10:07:44 (3 years ago)
Author:
nahi
Message:

ASPDotNetHandler unintentionally changed its behavior in 1.5.4. closes #144.
ASPDotNetHandler is intended to be used for accessing an ASP.NET doc/lit service as an rpc/encoded service. see a sample in test/soap/asp.net.

Files:

Legend:

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

    r1581 r1624  
    3030  def encode_data(generator, ns, data, parent) 
    3131    attrs = {} 
     32    # ASPDotNetHandler is intended to be used for accessing an ASP.NET doc/lit 
     33    # service as an rpc/encoded service.  in the situation, local elements 
     34    # should be qualified.  propagate parent's namespace to children. 
     35    if data.elename.namespace.nil? 
     36      data.elename.namespace = parent.elename.namespace 
     37    end 
    3238    name = generator.encode_name(ns, data, attrs) 
    3339    case data 
  • trunk/lib/soap/rpc/element.rb

    r1531 r1624  
    2121 
    2222  def response 
     23    root = root_node 
    2324    if !@is_fault 
    24       if void
     25      if root.nil
    2526        nil 
     27      elsif root.is_a?(SOAPBasetype) 
     28        root 
    2629      else 
    2730        # Initial element is [retval]. 
    28         root_node[0] 
     31        root[0] 
    2932      end 
    3033    else 
    31       root_node 
     34      root 
    3235    end 
    3336  end 
    3437 
    3538  def outparams 
    36     if !@is_fault and !void? 
    37       op = root_node[1..-1] 
     39    root = root_node 
     40    if !@is_fault and !root.nil? and !root.is_a?(SOAPBasetype) 
     41      op = root[1..-1] 
    3842      op = nil if op && op.empty? 
    3943      op 
     
    4145      nil 
    4246    end 
    43   end 
    44  
    45   def void? 
    46     root_node.nil? 
    4747  end 
    4848 
  • trunk/lib/soap/rpc/proxy.rb

    r1622 r1624  
    127127      :soapaction => op_info.soapaction || @soapaction, 
    128128      :envelopenamespace => @options["soap.envelope.requestnamespace"], 
    129       :default_encodingstyle => op_info.request_default_encodingstyle, 
     129      :default_encodingstyle => 
     130        @default_encodingstyle || op_info.request_default_encodingstyle, 
    130131      :elementformdefault => op_info.elementformdefault, 
    131132      :attributeformdefault => op_info.attributeformdefault 
     
    133134    resopt = create_encoding_opt( 
    134135      :envelopenamespace => @options["soap.envelope.responsenamespace"], 
    135       :default_encodingstyle => op_info.response_default_encodingstyle, 
     136      :default_encodingstyle => 
     137        @default_encodingstyle || op_info.response_default_encodingstyle, 
    136138      :elementformdefault => op_info.elementformdefault, 
    137139      :attributeformdefault => op_info.attributeformdefault