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

Ticket #406 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

Fixnum + instance variable causes MappingError

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

Description

from soap4r-ml.

> soap/mapping/encodedregistry.rb:351:in
> `_obj2soap': Cannot map Fixnum to SOAP/OM.

It means a Fixnum you are trying to send contains an instance variable
(You need to check the source to know about it.  No hint is in stacktrace).

  a = b = 1
  a.instance_eval {
    @a = 1
  }
  p a.instance_variables # ["@a"]
  p b.instance_variables # ["@a"]
  p 1.instance_variables # ["@a"]

  # Now, sending '1' as a SOAP request fails.

Can you confirm if it happens?  ActiveRecord thing?

And let me consider what soap4r can do to avoid it.  Rails should not do
this kind of global environment  pollution but...

Change History

08/31/07 23:17:57 changed by nahi

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

(In [1931]) * allow the Fixnum which have an instance variable to be marshalled. For Fixnum, ivars are not marshalled but allowed to be marshalled in Ruby's marshal. closes #406