Closed tomtomsen closed 7 years ago
As far as I remember, it was always disabled on purpose. What are drawbacks? How do you propose refreshing WSDL cache?
i dont think its wrong to disable the cache for the soapserver if YII_DEBUG is active.
but i think it should be reset afterwards, so that soapclients in a method do not get affected. i think it goes to far, because in that case YII_DEBUG affects a PHP class.
class ServerController extends CController
{
public function actions()
{
return array(
'service'=>array(
'class'=>'CWebServiceAction',
),
);
}
/**
* @soap
* @return string
*/
public function sayHi() {
$client = new SoapClient('http://example.com/soap/wsdl', array(
// cache will be disabled, if YII_DEBUG is enabled
));
$name = $client->getAName();
return "Welcome $name!";
}
If I use a SoapClient in a regular Web-Controller cache would be enabled, even if YII_DEBUG is active.
I think thats a diverging behavior.
Won't be fixed in 1.1.
I'm using a SoapClient in my Yii Webservice. When YII_DEBUG is active,
soap.wsdl_cache_enabled
becomes deactivated even for my SoapClient. (https://github.com/yiisoft/yii/blob/1.1.16/framework/web/services/CWebService.php#L164)I think this is an unexpected behavior.
I would like to make a pull-request which resets the
soap.wsdl_cache_enabled
value after SoapServer gets initialized.