$client->func() error. PHP client fails when two consecutive service calls are done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All 

I have a problem that is driving me crazy. Any help or idea is appreciated. 

I have axis2 server and php client. 
I have several functions within one service implemented. 

My problem is that if in my php client:

1 - I call web-service function 
$client = new
SoapClient('http://192.168.236.43:8080/axis2/services/conv3d?wsdl')
client->func1();  
everything works

2 - If I call 2 web-service functions one after another.
$client = new
SoapClient('http://192.168.236.43:8080/axis2/services/conv3d?wsdl')
client->func1();  
client->func2();  
PHP client fails with Error 
The connection was reset
The connection to the server was reset while the page was loading.
The site could be temporarily unavailable or too busy. Try again in a few
moments.
........

3 - If I call 2 web-service functions one after another and insert new
SoapClient once again between- Everthing works again. 
$client = new
SoapClient('http://192.168.236.43:8080/axis2/services/conv3d?wsdl')
client->func1();  
$client = new
SoapClient('http://192.168.236.43:8080/axis2/services/conv3d?wsdl')
client->func2();

I know that problem is not related with axis server because it works ok with
other soap clients(c client application, soapUI). 
My complete php code is below.
try {
   $client = new
SoapClient('http://192.168.236.43:8080/axis2/services/conv3d?wsdl');
}
catch (Exception $e) {
   echo "<h2>Exception Error!</h2>";
   echo $e->getMessage();
}
try{
   print_r($client);               
   $handle=$client->getHandle();
   echo 'getHandle: ',$handle ,"\n"; 
   print_r($client);
   try {
      // IF LINE BELOW IS UNCOMMENTED _ PROBLEM DOES NOT APEAR
      // $client = new
SoapClient('http://192.168.236.43:8080/axis2/services/conv3d?wsdl');   
      $handlea=$client->getHandle();  //   
     print_r($client);
   }
   catch (Exception $e) 
   {
      echo $e->getMessage();
   } 
}
   catch (Exception $e){
   echo 'Caught exception: ',  $e->getMessage(), "\n";
}	


///////////////////////
Dump for case 3. 
print_r($client) before and after first service call and after second
service call. 

SoapClient Object
(
    [_soap_version] => 1
    [sdl] => Resource id #4
)

getHandle: 15

SoapClient Object
(
    [_soap_version] => 1
    [sdl] => Resource id #4
    [httpsocket] => Resource id #5
    [_use_proxy] => 0
    [httpurl] => Resource id #6
)

getHandle: 16

SoapClient Object
(
    [_soap_version] => 1
    [sdl] => Resource id #9
    [httpsocket] => Resource id #10
    [_use_proxy] => 0
    [httpurl] => Resource id #11
)

Thanks for any help in advance.
-- 
View this message in context: http://old.nabble.com/%24client-%3Efunc%28%29-error.-PHP-client-fails-when-two-consecutive-service-calls-are-done-tp33280019p33280019.html
Sent from the Php - Soap mailing list archive at Nabble.com.


-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux