Refresh Coldfusion Web Service WSDL definition stub programmatically
Working on a project that requires two coldfusion servers to chat with each other through web services; something I haven't had to do for many years now. Anyway, as soon as I made a change to my publishing CFC, my consuming CFC started complaining. Seems that the server caches the WSDL signature of the remote cfc. That is great for production, but not so much for development. So, practically crawling into the wayback machine, I quickly found Brandon Purcell's nearly 6 year old solution to Refreshing Web Service Stubs in ColdFusion MX. With two moments worth of added abstraction:
<cffunction name="refreshRemoteService" access="public" output="false" returntype="boolean">
<cfargument name="service" type="string" required="true" />
<cfset var _return = true />
<cftry>
<cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory" />
<cfset RpcService = factory.XmlRpcService />
<cfset RpcService.refreshWebService(arguments.service) />
<cfcatch type="any"><cfset _return = false /></cfcatch>
</cftry>
<cfreturn _return />
</cffunction>
And here's a handy usage example:
<cfscript>
remoteWebPublisher = "http://www.remoteDomain.com/path/to/myRemote.cfc?wsdl";
refreshStatus = refreshRemoteService(remoteWebPublisher);
ws = Createobject("webservice",remoteWebPublisher);
myResult = ws.myRemoteMethod();
</cfscript>
Something worth remembering.

