Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, Here's my suggestion.</p> <p>The issue is, you have to snag the right part of the result, one that is something you can actually iterator over. Unfortunately, all the inspecting in the world won't help you because it's a huge blob of unreadable text.</p> <p>What I do is this:</p> <pre><code>File.open('myresult.yaml', 'w') {|f| f.write(result.to_yaml) } </code></pre> <p>This will be a much more human readable format. What you are probably looking for is something like this:</p> <pre><code> --- !ruby/object:SOAP::Mapping::Object __xmlattr: {} __xmlele: - - &amp;id024 !ruby/object:XSD::QName name: ListAddressBooksResult &lt;-- Hash name, so it's resul["ListAddressBooksResult"] namespace: http://apiconnector.com source: - !ruby/object:SOAP::Mapping::Object __xmlattr: {} __xmlele: - - &amp;id023 !ruby/object:XSD::QName name: APIAddressBook &lt;-- this bastard is enumerable :) YAY! so it's result["ListAddressBooksResult"]["APIAddressBook"].each namespace: http://apiconnector.com source: - - !ruby/object:SOAP::Mapping::Object </code></pre> <p>The above is a result from DotMailer's API, which I spent the last hour trying to figure out how to enumerate over the results. The above is the technique I used to figure out what the heck is going on. I think it beats using REXML etc this way, I could do something like this:</p> <pre><code>result['ListAddressBooksResult']['APIAddressBook'].each {|book| puts book["Name"]} </code></pre> <p>Well, I hope this helps anyone else who is looking.</p> <p>/jason</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload