Sha256: 291a8e53ba525f4f7eaf4c88a9b7b8e24030869a3a5be752d4fc739a74b86905

Contents?: true

Size: 929 Bytes

Versions: 15

Compression:

Stored size: 929 Bytes

Contents

# encoding: ASCII-8BIT
require 'helper'
require 'soap/rpc/router'
require 'soap/mapping/mapping'
require 'soap/processor'


module SOAP
module Fault


class TestSOAPArray < 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)
    # in literal service, RuntimeError is raised (not an ArgumentError)
    # any chance to use Ruby's exception encoding in literal service?
    assert_raises(RuntimeError) do
      registry = SOAP::Mapping::LiteralRegistry.new
      SOAP::Mapping.fault2exception(soap_fault, registry)
    end
  end

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


end
end

Version data entries

15 entries across 15 versions & 9 rubygems

Version Path
malagant-soap4r-1.5.8.20141127181857 test/soap/fault/test_soaparray.rb
rtiss_soap4r-1.6.1 test/soap/fault/test_soaparray.rb
rtiss_soap4r-1.6.0 test/soap/fault/test_soaparray.rb
eSpace_soap4r-1.5.8 test/soap/fault/test_soaparray.rb
soap4r-ruby19-1.5.9 test/soap/fault/test_soaparray.rb
tomdz-soap4r-1.5.8.20120202093209 test/soap/fault/test_soaparray.rb
soap5r-2.0.3 test/soap/fault/test_soaparray.rb
soap5r-2.0.2 test/soap/fault/test_soaparray.rb
soap5r-2.0.1 test/soap/fault/test_soaparray.rb
soap5r-2.0.0 test/soap/fault/test_soaparray.rb
soap5r-2.0.0.20120130130121 test/soap/fault/test_soaparray.rb
soap4r-sgonyea-1.5.9 test/soap/fault/test_soaparray.rb
sunteya-soap4r-1.5.8.0 test/soap/fault/test_soaparray.rb
tomdz-soap4r-1.5.8.20111103171510 test/soap/fault/test_soaparray.rb
rubyjedi-soap4r-1.5.8.20100619003610 test/soap/fault/test_soaparray.rb