首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

PHP中怎么调用webservice

2012-12-23 
PHP中如何调用webservicePHP中调用webservice?php$info new StdClass()$info-checkword $info-m

PHP中如何调用webservice
PHP中调用webservice

<?php$info = new StdClass();$info->checkword  = '';$info->mobileno  = '15013882539';$info->msg  = 'love asdflkj';$info->msgtype  = 'ECP';$info->resno  = 'SF';$param=array($info);$wsdl = "http://192.168.32.97:7001/WebMDSMS/services/procSMS?wsdl";$cliente = new SoapClient($wsdl);$vem = $cliente->__call('sendSMS',$param);print $vem;?>


nusoap调用webservice

<?phprequire("./lib/nusoap.php");$info = new StdClass();$info->checkword  = '';$info->mobileno  = '15013882539';$info->msg  = 'love asdflkj';$info->msgtype  = 'ECP';$info->resno  = 'SF';$param=array($info);$client = new nusoap_client('http://192.168.32.97:7001/WebMDSMS/services/procSMS?wsdl', true);$str=$client->call("sendSMS",$param);if (!$client->getError()){      echo " 程序返回 :".$str;}else{      echo " 错误 :".$err;}?>

热点排行