I am using a gem which uses soap/wsdlDriver.
When I post I get back a SOAP response and am unable to easily parse it.
This is the response I get back:
#<SOAP::Mapping::Object:0x159e95faf098 {}id="27b907f8-da51-f611-ab02-4c5f88a8ec8
8" {}error=#<SOAP::Mapping::Object:0x159e95fae33c {}number="0" {}name="No Error"
{}description="No Error">>
I need to get the entire value in the id=”xxxx”
This is what on get on heroku (note: it works locally). This comes from testing various variations of response.id (where response.inspect is what created the output above)
f”
{}error=#>
response[id]
/disk1/home/slugs/220752_47a08bb_10e7/mnt/app/controllers/sugarcrm_controller.rb
:77: warning: Object#id will be
deprecated; use Object#object_id nil
response.id:
/disk1/home/slugs/220752_47a08bb_10e7/mnt/app/controllers/sugarcrm_controller.rb
:79: warning: Object#id will be
deprecated; use Object#object_id
23891500658740
/disk1/home/slugs/220752_47a08bb_10e7/mnt/app/controllers/sugarcrm_controller.rb
:80: warning: Object#id will be
deprecated; use Object#object_id this
is the contact_id: 23891500658740
events:
Ok, I’m 95% sure that is the output of
SOAP::Mapping::Object#inspectand not the actual response. And from that class it looks you use the[]method to pull out attributes.So if I am reading that right, then it looks like you might want:
Though each attribute being prefaced with
{}seems pretty odd. So if that is actually part of the attribute name, you may need:But that seems pretty strange, and may indicate that the SOAP library you are using is not parsing the response properly.
Disclaimer: I’ve never used this lib before, and posted this from just perusing the docs… This may or may not be very accurate in the ways using this class is described.