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.