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

Ticket #393 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

NoMethodError when parsing the soap fault with the stack trace on the client

Reported by: nahi Assigned to: nahi
Priority: normal Milestone: 1.5.8
Component: soap4r Version: 1.5
Keywords: Cc:

Description

from soap4r-ml

Here is failing test case (using 1.5.7):

----------
require 'soap/rpc/router'
require 'soap/mapping/mapping'
require 'soap/processor'

require 'test/unit'

class SoapFaultParseArrayRaises < Test::Unit::TestCase

  # simulate the soap fault creation and parsing on the client
  def test_parse_fault
    router = SOAP::RPC::Router.new('parse_SOAPArray_error')

    soap_fault = pump_stack rescue router.create_fault_response($!)
    env = SOAP::Processor.unmarshal(soap_fault.send_string)
    soap_fault = SOAP::FaultError.new(env.body.fault)

    SOAP::Mapping.fault2exception(soap_fault,
SOAP::Mapping::LiteralRegistry.new)
  end

  def pump_stack(max = 0)
    raise ArgumentError if max > 10
    pump_stack(max+1)
  end
end
-----------

results in NoMethodError: undefined method `members' for
#<SOAP::SOAPArray:0x1650c10>

I'm seeing this when invoking a doclit service that raises an
exception. The exception then results in soap fault. Can you reproduce
it?

Thanks,
emil

Change History

07/31/07 22:12:20 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1908]) * avoid NoMethodError? when passing SOAPArray to LiteralRegistry?. It's caused when a servant raised an exception in literal service. Thanks to Emil for contributing test case for it. closes #393.