Need to hit a PHP soap WebService recently wrote a test demo code is very simple
Online also watched a lot of tutorials encountered a thorny problem
Service-Side service.php
soap_1_2); $server->setclass ("service"); $server->handle (); >
Client client.php
soap_1_2)); $soap = new SoapClient ("testsoap.wsdl", Array (' soap_version ' = soap_1_2)); Echo $soap->add (1,6); echo $soap->helloworld (). "
";? >
WSDL has generated no problem
The problem now is in the client code
If you want to write testsoap.wsdl now (client and WSDL are in the same folder), the result will be returned normally: 7HELLO
If the address of the WSDL is written in HTTP as if it were commented out, the browser prompts the timeout
Fatal error:maximum execution time of seconds exceeded in D:\PHPWeb\web\client.php on line 0
Is there a great God who can explain why
Reply to discussion (solution)
$soap = new SoapClient ("http://localhost/web/service.php?wsdl", Array (' soap_version ' = soap_1_2));
The second parameter can be used instead of
$soap = new SoapClient ("http://localhost/web/service.php?wsdl", Array (' soap_version ' = soap_1_2));
The second parameter can be used instead of
The second parameter deletes the result or the same
See if the soap:address of your WSDL file returns the correct address port.
Wsdl-endpoint:
I also encountered this problem, seeking answers.