我想解析下面的肥皂响应。问题出在 tag1 中,它指向一个名为 id1 的 href 链接。所以我们必须去 id1 的响应中获取值。
还有一件事是这个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>
<ns1:getBlock soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://diamondip.com/ipcontrol/ws/">
<getBlockByIpAddressReturn href="#id0"/>
</ns1:getBlock>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:WSGenericBlock" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://service.ipcontrol.diamondip.com">
<tag1 href="#id1"/>
<tag2 soapenc:arrayType="soapenc:string[1]" xsi:type="soapenc:Array">
<item xsi:type="soapenc:string">Container1</item>
</tag2>
<tag3 xsi:type="xsd:dateTime">2013-02-01T06:45:32.000Z</tag3>
<tag4 soapenc:arrayType="soapenc:string[4]" xsi:type="soapenc:Array">
<item xsi:type="soapenc:string">uf1=221805</item>
<item xsi:type="soapenc:string">uf2=34531</item>
</tag4>
<tag5 href="#id2"/>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:boolean" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">false</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" lowestSetBit="3" xsi:type="soapenc:integer" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">8</multiRef>
</soapenv:Body>
</soapenv:Envelope>