0

I am using nusoap in my PHP application when calling a .net webservice.

The issue is, in some cases .net web service is taking more than actual time for some request, so I want to increase the time my SOAP call waits for the response.

Is there any function or any way that I can keep nusoap call waiting until I get a response from the webservice.

Thanks, Rama

user1837996
  • 11
  • 1
  • 4

2 Answers2

6

Nusoap default timeout is 30 secs.

Increase Response timeout to solve this problem.

// creates an instance of the SOAP client object
 $client = new nusoap_client($create_url, true);

// creates a proxy so that WSDL methods can be accessed directly
$proxy = $client -> getProxy();

// Set timeouts, nusoap default is 30
$client->timeout = 0;
$client->response_timeout = 100;

Note : This settings also didn't work for some time. So i directly went to nusoap.php file and changed $response_timeout = 120. By default this value set to 30 secs.

It is solved now :)

References : Time out settings - Second reference

Kalidasan
  • 277
  • 3
  • 16
0

When you create the istance of the nusoap_client try

$client = new nusoap_client($$creat_url, true,false,false,false,false,0,300);

where all the false parameters default to false, 0 is the timeout and 300 is the response_timeout

Thanks

PravinS
  • 2,640
  • 3
  • 21
  • 25
nmirceac
  • 330
  • 2
  • 7