From: Ruby Rookie Date: 2007-08-14T05:15:03+09:00 Subject: accessing SOAP::Mapping::Object Hi, I just started with SOAP and Ruby and after one day trying to get it working I'am now stuck at getting the response into useable variables i.e. accessing the SOAP::Mapping::Object. I used soap4r and wdsl2ruby for generating the client code The bare SOAP XML result is: EF000000AC023F282007-07-24 19:08:58 2007-07-23 10:34:48 2007-07-24 15:51:34 2007-07-24 20:31:31 2007-07-23 10:05:14 2007-07-24 19:09:03 27 0 23 0 In ruby --- begin ruby code ------ #!/usr/bin/env ruby -d # issue the command to the server endpoint_url = ARGV.shift obj = DefaultSoap.new(endpoint_url) # run ruby with -d to see SOAP wiredumps. obj.wiredump_dev = STDERR if $DEBUG # SoapResponse = obj.fetchKnownUnits(:username => 'Me', :challenge => 'Secret') pp SoapResponse ----- end ruby code ---- The result on screen is: #>>> Can someone please give the code to capture the value foe the unit Id into a variable. I expected it to be something like: my_unit_id = SoapResponse['fetchKnownUnitsResult']['Units'][0]['Id'] Thanx Patrick