Home > Backend Development > PHP Tutorial > php调用webservices操作

php调用webservices操作

WBOY
Release: 2016-06-20 12:35:50
Original
953 people have browsed it

$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


?>



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template