RubygemSavonを使用してSOAPサービスにアクセスしようとしています。サービスに接続してリクエストを行い、応答を受信することはできますが、応答を解析できません。
応答には、multiRef要素への複数のhref参照が含まれています。を使用してデコードしようとすると
response.to_hash[:get_user_risk_profile_response][:get_user_risk_profile_return][:href]
#id0を取得します。id0リファレンスをフォローするにはどうすればよいですか?
SOAPの応答は以下のとおりです。ありがとう!
<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">
<soapenv:Body>
<getUserStatusResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<getUserStatusReturn href="#id0"/>
</getUserStatusResponse>
<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">
<parameters xsi:type="ns2:ArrayOf_tns3_ParamBean" xsi:nil="true" xmlns:ns2="http://api.example.com"/>
<siteID xsi:type="soapenc:string">UNKNOWN</siteID>
<userID xsi:type="soapenc:string">sam.wiggins</userID>
<userRiskScore href="#id1"/>
<userRiskScoreDT xsi:type="xsd:dateTime">2011-02-16T18:15:50.012Z</userRiskScoreDT>
</multiRef>
<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/">640</multiRef>
</soapenv:Body>
</soapenv:Envelope>