(来人领分啦!),该怎么处理
(来人领分啦!!!!!)
server端:
client端:
为啥客户端运行时会报错:fault code:Client
fault string : SoapClient::SoapClient() [soapclient.soapclient]: 'uri' option is required in nonWSDL mode
还有 能不能给我详细介绍下soapserver 跟soapclient方法里的那个array参数到底是怎么用的啊 ??
求高人帮助!!!
------解决方案--------------------
qqqqqqqqqqqqqqqqqqqqqqqqqq
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