Heim >Backend-Entwicklung >PHP-Tutorial >php调用webservices操作
$soap=new soapclient('http://XXXXX/XXX.asmx?wsdl',array('encoding'=>'GB2312')); --定义webservice地址,加上encoding=>'gb2312'为防止中言语乱码
print_r($soap->__getFunctions()); //获取
print_r($soap->__getTypes()); //
print_r($soap->wf_get_version()); //获取不赋值函数
$cardno='19053';
$pwd='abc';
$aryPara=array('as_cardno'=>$cardno,'as_pwd'=>$pwd); //赋值
$out=$soap->wf_getinfo($aryPara); //调用函数
print_r($out->wf_getinfoResult-name); //获取函数返回值1
print_r($out->wf_getinfoResult-mbl);//获取函数返回值2
?>