WSDL响应特定数据

时间:2019-01-20 15:43:19

标签: php soap wsdl asmx

我刚刚设法获得WSDL响应。

从我的var_dump($response);中,我收到了此消息:

object(stdClass)#3 (1) { ["ListSitesResult"]=> object(stdClass)#4 (1) { ["Site"]=> array(6) { [0]=> object(stdClass)#5 (7) { ["Id"]=> string(5) "97608" ["Name"]=> string(7) "Name1" ["MaxOccupancy"]=> int(704) ["Occupancy"]=> int(209) ["Hysteres"]=> int(5) ["Marginal"]=> int(10) ["Active"]=> bool(true) } [1]=> object(stdClass)#6 (7) { ["Id"]=> string(5) "97609" ["Name"]=> string(6) "Name2" ["MaxOccupancy"]=> int(180) ["Occupancy"]=> int(92) ["Hysteres"]=> int(5) ["Marginal"]=> int(3) ["Active"]=> bool(true) } [2]=> object(stdClass)#7 (7) { ["Id"]=> string(5) "97611" ["Name"]=> string(8) "Name3" ["MaxOccupancy"]=> int(319) ["Occupancy"]=> int(49) ["Hysteres"]=> int(5) ["Marginal"]=> int(3) ["Active"]=> bool(true) } [3]=> object(stdClass)#8 (7) { ["Id"]=> string(5) "97612" ["Name"]=> string(6) "Name4" ["MaxOccupancy"]=> int(388) ["Occupancy"]=> int(145) ["Hysteres"]=> int(5) ["Marginal"]=> int(10) ["Active"]=> bool(true) } [4]=> object(stdClass)#9 (7) { ["Id"]=> string(6) "111562" ["Name"]=> string(10) "Name5" ["MaxOccupancy"]=> int(151) ["Occupancy"]=> int(70) ["Hysteres"]=> int(5) ["Marginal"]=> int(10) ["Active"]=> bool(true) } [5]=> object(stdClass)#10 (7) { ["Id"]=> string(6) "111563" ["Name"]=> string(10) "Name6" ["MaxOccupancy"]=> int(84) ["Occupancy"]=> int(20) ["Hysteres"]=> int(5) ["Marginal"]=> int(10) ["Active"]=> bool(true) } } } }

现在我不知道如何从每个ID接收特定数据“占用率”和“最大占用率”。 我想使用$ response或能够缓存数据,这样它们就不会触发每个调用。

某种$name2 = Occupancy & MaxOccupancy from $response where ID = 97609

可以在以下位置找到

WSDL构建的信息:https://online.infracontrol.com/Areas/Parking/Services/V1/ParkingInfo.asmx?WSDL

https://online.infracontrol.com/Areas/Parking/Services/V1/ParkingInfo.asmx?op=ListSites

谢谢!

0 个答案:

没有答案