Note that there are some explanatory texts on larger screens.

plurals
  1. POParsing Savon SOAP response with multiRef
    text
    copied!<p>I am attempting to access a SOAP service using the Ruby gem Savon. I can connect to the service and make a request and receive the response, but I cannot parse the response.</p> <p>The response contains multiple href references to multiRef elements. When I try to decode it using </p> <pre><code>response.to_hash[:get_user_risk_profile_response][:get_user_risk_profile_return][:href] </code></pre> <p>I get #id0. How do I follow the id0 reference?</p> <p>The SOAP response is below. Thanks!</p> <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;soapenv:Body&gt; &lt;getUserStatusResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt; &lt;getUserStatusReturn href="#id0"/&gt; &lt;/getUserStatusResponse&gt; &lt;multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:UserRiskProfileBean" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://xrisk.api.example.com"&gt; &lt;parameters xsi:type="ns2:ArrayOf_tns3_ParamBean" xsi:nil="true" xmlns:ns2="http://api.example.com"/&gt; &lt;siteID xsi:type="soapenc:string"&gt;UNKNOWN&lt;/siteID&gt; &lt;userID xsi:type="soapenc:string"&gt;sam.wiggins&lt;/userID&gt; &lt;userRiskScore href="#id1"/&gt; &lt;userRiskScoreDT xsi:type="xsd:dateTime"&gt;2011-02-16T18:15:50.012Z&lt;/userRiskScoreDT&gt; &lt;/multiRef&gt; &lt;multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;640&lt;/multiRef&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; </code></pre>
 

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