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

(来人领分啦!),该怎么处理

2012-02-24 
(来人领分啦!!!!!)server端:PHP code?php error_reporting(7)$servernew SoapServer(null,array(uri

(来人领分啦!!!!!)
server端:

PHP code
<?php error_reporting(7);$server=new SoapServer(null,array('uri'=>"http://test-rui"));function sayhello($str){    return "Hello ".$str;}$server->addFunction('sayhello');$server->handle();?>


client端:
PHP code
<?php error_reporting(7);try{    $client=new SoapClient(null,array('location'=>"http://localhost/php webservice/server.php","http://test-rui"));    $client->sayhello("Jim");}catch (SoapFault $fault){    echo "fault code:".$fault->faultcode."<br>". "fault string : ".$fault->faultstring;}?>


为啥客户端运行时会报错:fault code:Client
fault string : SoapClient::SoapClient() [soapclient.soapclient]: 'uri' option is required in nonWSDL mode

  还有 能不能给我详细介绍下soapserver 跟soapclient方法里的那个array参数到底是怎么用的啊 ??  
求高人帮助!!!

[解决办法]
qqqqqqqqqqqqqqqqqqqqqqqqqq

热点排行