include_once('./nusoap/nusoap.php');//the function of search informations
function searchInfo($sdate,$edate,$caller='',$rece='')
{
$tempYear = substr($sdate,0,4);
$tempMonth = substr($sdate,4,2);
$tempDay = substr($sdate,6,2);
$sdate = mktime(0,0,0,$tempMonth,$tempDay,$tempYear);
$tempYear = substr($edate,0,4);
$tempMonth = substr($edate,4,2);
$tempDay = substr($edate,6,2);
$edate = mktime(0,0,0,$tempMonth,$tempDay,$tempYear); $data = `sudo /usr/local/www/www/scripts/www-sms queryRecord_ "1349884800:1350662399::"`;
return $data; //这里应该没有问题,我改为1了,显示的结果还是标题上提示的
}
//"$sdate:$edate:$caller:$rece"
$soap = new soap_server();$soap->configureWSDL('jy','urn:jy'); //这个是jy是服务器名,就是这里比较纳闷,不知道写什么,我的服务器上的目录是 /usr/local/asg/www/php ,其中www目录真实路径是 /var/jy,这里应该写什么???$soap->register('searchInfo',
array('sdate'=>'xsd:string','edate'=>'xsd:string','caller'=>'xsd:string','rece'=>'xsd:string'),
array('return'=>'xsd:string'),
'urn:jy',
'urn:jy#searchInfo'
);$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:'';
$soap->service($HTTP_RAW_POST_DATA);
<?phpinclude_once('./nusoap/nusoap.php');$client = new soapclient();$data = $client->call('searchInfo',array('sdate'=>'20121010','edate'=>'20121019','caller'=>'','rece'=>''));if(($err = $client->getError())) {
echo '错误为:',$err;
} else {
echo $data;
}这是接收端的,刚刚看了下,原来链接地址忘写了,可是写了之后,页面上什么也不显示了
$client = new soapclient('http://192.168.100.56/numberInterface.php/wsdl',true);
这里有nusoap的使用详解和demo,你可以看一下他是怎么写的.或许会对你有所帮助