PHP SOAP WebService Connection time-out problem

Source: Internet
Author: User
Tags wsdl
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.

  • 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.