Hi all,

I was having some problem with loading the WSDL from my web service. Currently I'm changing the web service multiple times a day to improve it, and also have to reload the settings in drupal. Today I had a problem with loading the WSDL, I've deleted a function and added a function to my web service, when I was trying to reload the settings in drupal it didn't changed the settings. I've ad the following line to wsclient_soap.module and it all worked again. Don't know if it's the right way to solve the problem.

The line:
ini_set("soap.wsdl_cache_enabled", "0");

Someone has some advise to my issue?

Thanks,
Rik

Comments

klausi’s picture

Title: caching wsdl » Disable the WSDL cache during development
Component: Code » Documentation
Category: support » task

Yep, you will want to disable the WSDL cache during development - but you want the cache on production environments, because then you don't need to load the WSDL file for every SOAP request, which is quite a performance gain.

Maybe we should document this?

RikD’s picture

Thanks for the replay, maybe it is useful to put it into the documentation.

Is the way I do it the easiest way to do it or are there other options to turn of the cache during development, maybe some build-in option :P.

By the way. Wwsclient easy to use plugin. My compliments for the development team..

tuccio’s picture

If you don't want to disable the wsdl cache but need clearing it occasionaly, you can just delete the wsdl--* files from the php temp_dir (usually /tmp). Perhaps this would be a useful option to add to the module?

dman’s picture

FYI, I've just pushed this to the wsclient_tester module.

If you use -dev (or the next release to come) and use the wsclient tester on the WSDL, it will flush your cache each time you make a request.
This did my head in this evening, and I figure that people who test want it flushed.
It will have no effect on day-to-day running, but belongs in the test zone.

dman’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#2269661: Refresh Web Service

Pushing this to #2269661: Refresh Web Service because, although that issue is newer, it has a suggested fix (no patch yet) and identifies that it's not just about PHP WSDL caching - it's about how the web service definition imported and remembered by wsclient itself needs a full rebuild when a service changes during development.

neuron1122’s picture

use can use this instead of turing off the cacshe
$client = new SoapClient('http://somewhere.com/?wsdl', array('cache_wsdl' => WSDL_CACHE_NONE) );