# SOAP::Mapping::Object attribute access

**URL:** <https://www.ruby-forum.com/t/soap-object-attribute-access/101446>\
**Category:** Rails\
**Created:** [August 4, 2006, 9:34pm UTC](https://www.ruby-forum.com/t/soap-object-attribute-access/101446 "2006-08-04T21:34:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doug\_Selph](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@Doug\_Selph](https://www.ruby-forum.com/u/Doug_Selph)\
**Post date:** [August 4, 2006, 9:34pm UTC](https://www.ruby-forum.com/t/soap-object-attribute-access/101446/1 "2006-08-04T21:34:06Z")

</div>

I have written a Rails web service, which is working exactly as  
expected.  
The service has a method which returns an object of type  
ActionWebService::Struct. In my SOAP client, I create a SOAP rpc driver,  
and  
execute the method, like this:

book = driver.ShowTitle(params[:isbn])

I then do a:

logger.info book.inspect

and find this in the log:

\<SOAP::Mapping::Object:0x…ca7b389da {}author\_fname=“David”  
{}author\_lname=“Johnson” {}title=“The Story of SOAP”\>

I cannot figure out how to access the attributes of this  
SOAP::Mapping::Object. The empty curly braces are throwing me for a  
loop.

Anyone see this before?

---

<div class="post-metadata">

**Author:** ![Doug\_Selph](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@Doug\_Selph](https://www.ruby-forum.com/u/Doug_Selph)\
**Post date:** [August 4, 2006, 10:19pm UTC](https://www.ruby-forum.com/t/soap-object-attribute-access/101446/2 "2006-08-04T22:19:15Z")

</div>

So, after a couple of days of head scratching, I finally figured it out.

The argument to the [] instance method for SOAP::Mapping::Object  
requires a  
quoted string rather than a symbol, so this one is solved.
