When you use WebServices with ColdFusion, the WSDL ’stub’ is cached in CF Administrator (presumably for performance reasons).
This can be a pain when you need to change the WSDL and you don’t have access to CF Admin to flush the service which is the scenario I found myself in today.
Luckily for me I sit near some ColdFusion peeps who sorted me out with a little Java method (courtesy of the ServiceFactory) to flush a WSDL from a ColdFusion template.
Basically all you need to do is:
I also wrapped it up in a little function:
Thanks Marko (and Mark)
After the fact I did some googling and found a great read from Doug Boude on Refreshing Cached ColdFusion Webservices Through the Back Door in case you’re interested.
Of course, you could just use the _supported_ method. In CF8, both cfinvoke and cfobject have a refreshWSDL argument that lets you refresh the wsdl (obviously).
Raymond Camden
April 7th, 2008
@Ray - Ah another CF8 gem! Thanks for the info, unfortunately I’m on CF7 in production for a little while longer. But good to know for when we upgrade, thanks
Michael Sharman
April 7th, 2008
[...] Michael Sharman shows how to dynamically flush a cached web service in CF 7 (and Raymond Camden points out in the comments that there’s now a supported method for doing the same thing in CF8) [...]
SitePoint Blogs » The Week in ColdFusion: 2-8 April: updater overload
April 10th, 2008