I have a problem, that whenever I make changes to my custom API extension WSDL file, the changes are not visible immediately. It takes a day or two for them to appear. I have tried to clear the Magento tmp
directory, but there is nothing to be cleared. Also, I have tried restarting my local apache server, and cleaning its /tmp
directories, from where I make API calls, but no help.
Does anyone have idea why is this, and how it can be corrected? Thanks for any advice开发者_如何学C.
In order to get changes for the various xml files to take effect in a more timely manner you have to clear the magento cache. It can be found in $magentoinstall/var/cache
When you do that it forces magento to reprocess all the config and your change should appear right away.
I hear tell you can use the magento admin panel to accomplish this as well
Go to System -> Cache Management
Click on “select all” in the upper left corner
Under “action” click on “refresh” and click submit
Then click on these buttons:
Flush Magento Cache
Flush Cache Storage
I've never used the 2nd method. See here for more information.
http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/system_cache/index
Clearing cache from System -> Cache Management seems to have 0 affect on WSDL.
While testing you can prevent Mage from caching WSDL with this code:
$client = new SoapClient('http://somewhere.com/?wsdl', array('cache_wsdl' => WSDL_CACHE_NONE) );
On the server side you can disable Magento Wsdl cache at System->Configurations->Services->Magento Core API->Enable WSDL Cache.
Maybe you should remove all files from var/cache/ folder.
On the client side (api client) you can simply add
ini_set("soap.wsdl_cache_enabled", 0);
to avoid SoapClient lib caching.
精彩评论