日期:2014-05-17 浏览次数:20677 次
<?php
require_once('nusoap.php');
Class ExtSOAP {
public $server;
public $http_raw_post_data;
function __construct(){
$this->server = new soap_server();
$this->server->register('hello');
$this->http_raw_post_data = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
}
function services() {
$this->server->service($this->http_raw_post_data);
}
}
// 类调用
$obj = new ExtSOAP();
$obj->services();
?>
------解决方案--------------------
学习了
------解决方案--------------------
不需要注册所有的函数。
你做一个共用的入口函数。
class myclass{
//***********
}
function runApi($methodname,$parment){//方法名,参数数组
$classname = "myclass";
call_user_func_array(array($classname, $methodname),$parment);
}
------解决方案--------------------
用PHP里的soap就可以
------解决方案--------------------
用zendstdio可以生成wsdl
我正在使用《Csdn收音机》第一时间获取最新动态!