读书人

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

发布时间: 2012-02-24 16:30:39 作者: rapoo

(来人领分啦!!!!!)
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

读书人网 >XML SOAP

热点推荐