Heim  >  Artikel  >  Backend-Entwicklung  >  php调用webservices操作

php调用webservices操作

WBOY
WBOYOriginal
2016-06-20 12:35:50882Durchsuche

$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


?>



Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn