Web services are great - but they are not a magic bullet. You have to become familiar will all their little quirks to use them effectively. This is a nice tip I picked up on the email list for BACFUG (I love the retro logo). Sometimes you might have a CFC that you are calling as a webservice like this:
<cfscript>
// service wsdl file
sdl = 'http:/' & '/mydomain.com/WS/myservice.cfc?wsdl';
// create object
sv = CreateObject('webservice', sdl);
</cfscript>
If you make a change to a method in the CFC (add or change an argument - or a type), and you refresh your page that uses the web service, you may not see the change. That is because the CF Server creates a "stub" (a proxy class) from your WSDL and puts it in the cache. It does not automatically know that the file has changed. You can refresh the cache from the CF administrator, but you may not always have access to it (if you are on a shared server). In fact, the CF Admin method doesn't always work for some reason. Not to worry, Tarik Ahmed (
Cflex.net) offers this programmatic solution.
<cfscript>
// service wsdl file
sdl = 'http:/' & '/mydomain.com/WS/myservice.cfc?wsdl';
// create object
factory = CreateObject('JAVA', "coldfusion.server.ServiceFactory");
// reference to the XmlRpcService
RpcService = factory.XmlRpcService;
// refresh the object in question
RpcService.refreshWebService(sdl);
</cfscript>