php5 apache 2.2 webservice 创建与配置(java)


<?php
class service
{
function add($a,$b){
$c=$a+$b;
return $c;
}
function str($string){
return $string;
}
}
//require('cls_mysql.php');
//$db = new cls_mysql('localhost', 'root', 'root', test_db');
//$db = new cls_mysql('211.103.156.227:3306', 'root', 'txtx', test_db');
//'testwsdl.wsd需要在后面采用Zend Studio生成。
$server=new SoapServer('testwsdl.wsdl',array('uri' => 'http://webserver.com/','encoding'=>'utf-8','soap_version' => SOAP_1_2 ));
$server->setClass("service");
$server->handle();
?>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/1e693d0d507678d505ffbd2e9c462d24.html