输入banner图图片脚本导航/分类

php使用soap的例子

  1. $soap = new SoapServer($wsdl,$array);

2、SoapClient

  1. $soap = new SoapClient($wsdl,$array);

3、SoapFault

  1. $fault = new SoapFault($faultcode,$faultstring);

两种引用方式: 方式1,引入wsdl文件。 方式2,不使用wsdl文件。

以下的例子便是不使用wsdl文件的方式。

服务器端代码:

 "abcd")); 
$server->setClass("service"); 
$server->handle(); 
?> 

客户端代码:

 "http://localhost/interface/soap.php", 
"uri"      => "abcd",  //资源描述符服务器和客户端必须对应 
"style"    => SOAP_RPC, 
"use"      => SOAP_ENCODED 
   )); 

echo $soap->Add(1,2); 
}catch(Exction $e){ 
echo print_r($e->getMessage(),true); 
} 
?>