From: "NAKAMURA, Hiroshi" Date: 2006-08-30T06:40:27+09:00 Subject: Re: Weird string problem (cause in SOAP4R) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Sorry for late reply. Peter C. Verhage wrote: > Hi, > > I finally found what is different from the string read from file and the > string I manually created. The string from file has an added instance > variable "@ical_params", which seems to be added by the ical library I'm > using. The following check in SOAP4R (factory.rb) seems to be the problem: > > class StringFactory_ < Factory > ... > > def obj2soap(soap_class, obj, info, map) > if !@allow_original_mapping and !obj.instance_variables.empty? > return nil > end > ... > > Removing this if-statement causes the problem to disappear. Now I just > have to figure out why this if-statement is there and what it needs to > do... Without this guard, soap4r will generate something like blah blah instead of epointment#1481 which should not be what you want. Hmm. Can soap4r distinguish objects class Foo attr_reader :ical_params end obj = Foo.new obj.ical_params = 123 obj (ical_params in obj should be serialized) and obj = "abc" obj.instance_eval { @ical_params = 123 } obj (ical_params in obj may not need to be serialized) ? Regards, // NaHi -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) iQEVAwUBRPS0Cx9L2jg5EEGlAQKUBwf/TlcHYFxCKypEV2600pFNdDpYji4aOaP6 os/EfjQO+Vtk3Db75s86L6uGFO/XmUF+n7yq2Vvuo+3abgQS7aXIWMukl7FKghcu 8FkAGdB+WDtTcy0fBNBHn85+xDKOjcVH5YBf/vbD/vin+Ad+4T4unBcRoT4HVyjM 0Jle+2tZcJIq09buKc2Hn4SmiXrPzwkAqr326M445NxNkPtEeT+0Z09glnHdZDmp Uky1pJQkKa1Bq6d1mGo+eGFzs1eoeOjyCXMoq/pRZVJzmUxw9lpPxLfxI4qC1LdW l0P++ZZa1XaT87P9bUnzoZeYrl5Xe9TRtSZobU0ixoKb3uy9rNTIlw== =aBHq -----END PGP SIGNATURE-----