Phpsoap-related questions... -Php Tutorial

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.