PHPSOAPwebservice connection timeout

Source: Internet
Author: User
PHPSOAPwebservice connection timeout problem recently requires a php soap webservice to write a test demo code which is very simple.
I also read a lot of tutorials online and encountered a tricky problem.

Server service. php
  SOAP_1_2));$server->setClass("service");$server->handle();?>


Client. php
  SOAP_1_2));$soap = new SoapClient("TestSoap.wsdl", array('soap_version' => SOAP_1_2));echo $soap->Add(1,6);echo $soap->HelloWorld()."
";?>


No problem with wsdl generation

The problem is that the client code

If you want to directly write TestSoap. wsdl (the client and wsdl are in the same folder), the returned result is 7 HELLO.

If the wsdl address is written as an http address, the browser prompts timeout.
Fatal error: Maximum execution time of 30 seconds exceeded in D: \ PHPWeb \ web \ client. php on line 0

Can anyone explain why?


Reply to discussion (solution)

$ Soap = new SoapClient ("http: // localhost/web/service. php? Wsdl ", array ('soap _ version' => SOAP_1_2 ));
The second parameter is optional.

$ Soap = new SoapClient ("http: // localhost/web/service. php? Wsdl ", array ('soap _ version' => SOAP_1_2 ));
The second parameter is optional.

The result of deleting the second parameter is still the same.

Check whether the address port returned by the soap: address in your wsdl file is correct.
WSDL-Endpoint:





I have encountered this problem. please answer it.

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.