server端:
php codehttp://test-rui));function sayhello($str){ return hello .$str;}$server->addfunction('sayhello');$server->handle();?>
client端:
php codehttp://localhost/php webservice/server.php,'uri'=>http://test-rui)); $client->sayhello(jim);}catch (soapfault $fault){ echo fault code:.$fault->faultcode.
. fault string : .$fault->faultstring;}?>
为啥客户端运行时会报错:fatal error: uncaught soapfault exception: [http] not found in d:\phpweb\php webservice\client.php:6 stack trace: #0 [internal function]: soapclient->__dorequest('__call('sayhello', array) #2 d:\phpweb\php webservice\client.php(6): soapclient->sayhello('jim') #3 {main} thrown in d:\phpweb\php webservice\client.php on line 6
用try catch 后 得到这个:
fault code:http
fault string : not found
还有 能不能给我详细介绍下soapserver 跟soapclient方法里的那个array参数到底是怎么用的啊 ??
求高人帮助!!!
------解决方案--------------------
server端有个wsdl文件,怎么没有?