ColdFusion WSDL shuts down on first call

I have a web service setup on a small part of the website, and although the site as a whole receives a good amount of traffic, this particular service does not work. Once a day, when I go to send a request through a web service, it will not crash on the first attempt, but retrying the retry request works fine. It is as if it is no longer cached in memory and does not start during startup.

Is there a way to activate this service both at my end and at the end of the web service, which is also a CF application (a separate division of our company)? This is a little difficult to fix because it only happens once after a long period. And I do not want to configure a separate process to just ping this service.

+3
source share
3 answers

You can try using the following client-side webservice method. CF7 + received the built-in coldfusion.server.ServiceFactory Java service.

The code may look like

<cftry>
    <!--- here goes attempt to invoke service method, maybe dummy "ping" --->
<cfcatch type="any">
    <!--- trying to refresh WSDL --->
    <cfset createObject("java","coldfusion.server.ServiceFactory").XmlRpcService.refreshWebService(ServiceURL) />
</cfcatch>
</cftry>
<!--- usual code --->

Hope this helps.

Note: this factory contains many useful methods, but almost zero documentation over the Internet. A good idea would be to dump it and study a little.

+1
source

If the server is regularly restarted between template calls, make sure that the "save class files" option is enabled in the administrator (under caching) to prevent the template from being recompiled after each server reboots.

+4
source

, .

+1

All Articles