Phpsoap is a top-notch question ......!! Server: PHPcode & lt ;? Phperror_reporting (7); $ servernewSoapServer (null, array (uri & gt; & quot; test-rui & quot;); functionsayhello ($ str) {return & qu php soap question begging experts to answer ......!!
Server:
PHP code
"http://test-rui"));function sayhello($str){ return "Hello ".$str;}$server->addFunction('sayhello');$server->handle();?>
Client:
PHP code
"http://localhost/php webservice/server.php",'uri'=>"http://test-rui")); $client->sayhello("Jim");}catch (SoapFault $fault){ echo "fault code:".$fault->faultcode."
". "fault string : ".$fault->faultstring;}?>
When the client is running, the following error occurs: Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in D: \ PHPWeb \ php webservice \ client. php: 6 Stack trace: #0 [internal function]: SoapClient->__ doRequest (' _ Call ('sayhel', 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
Use try catch to get this:
Fault code: HTTP
Fault string: Not Found
Can you tell me in detail how to use the array parameter in the soapserver and soapclient methods ??
Please help me !!!
------ Solution --------------------
The server has a wsdl file. why not?