PHP如何解析 WEBSERVICES接口返回的数据
WEBSERVICE服务器,他们用.net写了个接口 http://XXX.XXX.XXX.XX/Info.asmx?wsdl
我用PHP调用这个接口
try{
$wsdl = "http://XXX.XXX.XXX.XX/Info.asmx?wsdl";
$client = new SoapClient($wsdl);
$param = array('strName'=>'吴小明', 'strIDCard'=>'4528XXXXXXXX', 'decZiparea'=>'450900');
$res = $client->GetBasicInfo($param);
print_r($res);
}catch(SOAPFault $e){
var_dump($e);
}
得到如下结果:
stdClass Object
(
[GetBasicInfoResult] => stdClass Object
(
[any] =>
4507…………
4507…………
吴……
男性
4528…………
1966-0