From: "NAKAMURA, Hiroshi" Date: 2002-05-02T10:32:28+09:00 Subject: Re: xmlrpc4r won't unmarshal Hi, > From: Liam Holman [mailto:liam.holman@auriga.co.uk] > Sent: Wednesday, May 01, 2002 11:23 PM > The Marshal sample client returns a Hash > when I'd expect a Person. > Is this a stupid newbie conceptual error here, am I simply > going mad, or > what? Hmm. Parsing stack for Struct in xmlrpc/parser seems to be broken while parsing. # MNeumann: At least, '@name' should be 'name' at line 518? # Though it still doesn't work... You can use XMLRPC::Convert.struct method for workaround. AFAIK, it should be called by the parser when ENABLE_MARSHALLING is true. > require "xmlrpc/marshal" > require "person" > > a = Person.new("James",23) > puts a.inspect > b = XMLRPC::Marshal.dump_response(a) > puts b.inspect > c = XMLRPC::Marshal.load_response(b) > puts c.inspect d = XMLRPC::Convert.struct( c ) p d #=> Regards, // NaHi