(来人领分啦!!!!!)
server端:
<?php error_reporting(7);$server=new SoapServer(null,array('uri'=>"http://test-rui"));function sayhello($str){ return "Hello ".$str;}$server->addFunction('sayhello');$server->handle();?>
<?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;}?>