专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > XML/SOAP

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

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
(来人领分啦!!!!!)
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
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: