php - SoapClient call not executing - timeout -


with php, when trying call method soap, bust maximum execution time. however, since calling method worked in past, when remove 'cache_wsdl' => wsdl_cache_none starts working.

if fetch wsdl file_get_contents completely. however, doesn't work when call method

$client = new soapclient("https://.../file.asmx?wsdl", array(     'soap_version' => soap_1_1,     'trace' => true,     'cache_wsdl' => wsdl_cache_none ));  $result = $client->somemethod($parameters); 

at point able error:

fatal error: uncaught soapfault exception: [http] error fetching http headers in myfile.php stack trace: #0 [internal function]: soapclient->__dorequest('<?xml version="...', 'https://abc.def...', 'http://someser....', 1, 0) #1 myfile.php(27): soapclient->__call('somemethod', array) #2 myfile.php(27): soapclient->somemethod(object(z)) #3 {main} thrown in myfile.php on line 27 

i love more diagnostics errors not know how?
pay wsdl service , unusable... wsdl server's fault? how can sure , can service provider? call somemethod doesn't answer in time? (even though able download wsdl)

so, said when disable wsdl_cache service starts working.

i had lot of frustration moments because of having wsdl_cache turned "on" on development environments. thing if have wsdl_cache turned on on development environment, soapclient object download wsdl file first time call service. lets suppose change return type or name of existing function, times, soapclient object not download new wsdl new modifications , generated xml soap request no longer match web service description anymore, , call fail.

this happen me using zend framework , class zend_soap_client , generating wsdl dynamically based on annotations of class setup handle service requests using zend_soap_autodiscover.

in linux, php stores cached wsdl files in side /tmp folder filname prefix "wsdl". can go there , delete files, next request grab new wsdl. or better enough, turn off wsdl cache settings in php.ini file or putting line on beginning of script make call.

ini_set('soap.wsdl_cache_enabled',0); 

ps: turning off wsdl_cache recommended on development environments because of modifications made web service source code. having wsdl_cache off can dramatically slow down performance on high traffic production environments. so recommend off on development.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -