• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF 9 Web Service Stubs re-compile nightly

New Here ,
Jan 02, 2019 Jan 02, 2019

Copy link to clipboard

Copied

I'm running an old CF 9 server and application where it calls out to a remote web service every half hour between the hours of 7:30 am and 11:00 pm every day through the job scheduler.

At the 7:30 am run, it always re-compiles the web service stubs every day.  This generates a GET when it is requesting the fresh WSDL from the remote endpoint, and then it generates a POST when it is invoking the normal method it uses to pass data.  Subsequent calls to this remote endpoint do not cause the stubs to re-compile, and the GET is subsequently also not generated, that is, until 7:30 am the next day.  The problem is that I am trying to get rid of that first GET at 7:30 am, which is another way of saying I don't want the system to re-compile the stubs every day.

I have checked the code, and ancient though it is, it uses cfinvoke webservice="https://someendpoint.asmx?wsdl" method="SomeMethod" returnvariable="returnXML".  I'm not sure if the refreshWSDL attribute existed in CF 9, but in any case, it's not being called.

I have investigated whether either the application or an operating system function might be deleting those stub files on a nightly basis, but can find no evidence that this is happening.  I know that deleting the stubs will cause them to recompile the next time the web service is invoked, and it may be that this is happening, and that I just haven't found the cause of it yet.

But if there are any other mechanisms by which CF will force the stubs to get re-compiled, other than by deleting them, or by using the refrshWSDL directive either on the cfinvoke tag or via the CreateObject function, I'd appreciate any details.  Or if I'm off-base and it's something completely different, I'd also appreciate any suggestions.

Thanks

Rob

Views

418

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2019 Jan 06, 2019

Copy link to clipboard

Copied

I think you're on the right track. The relevant attribute is refreshWSDL. It's been there since CF 8. Set it to "no" if don't want the service to recompile.

You will find useful information on refreshWSDL in Charlie Arehart's blog. Also read the comments that follow the blog-post.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

Copied

Thanks for the response.  Yes, I am aware of refreshWSDL, and really that is the mystery.  This web service call never used that attribute, and the default is False, so I would not expect it to ever refresh the stub files.  But after our customer brought this to my attention, I explicitly set it to False, and yet the problem persists.  For some reason when the web service call is run at 7:15 am, which is the first time it runs since just before midnight of the previous day, the stubs recompile.  The code does not change, and refreshWSDL is explicitly set to false, and yet it still happens.

Interestingly, we did consult with Charlie about this problem, and in the time allotted, he identified that this extra GET the customer is complaining about is due to the stubs recompiling.  Unfortunately, we ran out of time and have not been able to track down the reason the stubs recompile.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

Copied

I know nothing of Web Services under ColdFusion, and cannot really add anything to this conversation.  But, just curious, do any of the logs give any insight into this issue?  CF logs, server logs, webserver logs (IIS, Apache), any kind of logging apparatus.  Something, somewhere, _should_ be describing what is happening, and possibly why.

If this isn't triggered by CF code, or a setting in CFAdmin, could it be triggered by the webserver, or the server OS?  Is a database involved?

HTH,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

Copied

We definitely have looked in the logs, and have also worked with Fusion Reactor on that server.  FR is the tool that lead us to the web service stub files.  The server logs just reveal that the stubs are recompiling daily.  Here's a grouping that illustrates that:

"Starting Web service request."

Creating Web service proxy {url='https://SomeEndPoint.asmx?wsdl'}

Downloaded the wsdl https://SomeEndPoint?wsdl

It's the "Downloaded the wsdl" message we see once a day.  It does that when the stubs (the class files that CF builds from the WSDL retrieved from the end point) get recompiled.

Ultimately a database is involved, to create some outbound XML, and then after the end point returns some XML, then our code uses that to update a DB.  But I don't see the DB as being inherently involved in this issue.

It's as if some flag in CF's brain is being reset sometime between midnight and 7:15 am, so that the next call to the web service causes the stubs to re-compile, even though there is no directive in our code to cause it to do this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

Copied

Ok

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

Copied

You could do the following, once only, on a quiet day at the server. Delete the stubs and clear the cached classes and components. This forces a new compilation, hopefully with refreshWSDL set to false this time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 09, 2019 Jan 09, 2019

Copy link to clipboard

Copied

We've deleted the stubs more times than I can count during all of the back-and-forth of troubleshooting.  But now that you mention it, I don't think we also cleared the cached classes and components.  Is that done by just restarting the CF instance after the stubs have been cleared?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 09, 2019 Jan 09, 2019

Copy link to clipboard

Copied

Not necessarily - there are a couple of caching options for compiled CF code under Server Settings ... Caching, and one of them is to cache compiled classes to disk. It's often a good idea to turn this off for other reasons, but I notice it appears to be on by default for CF 2018. I don't remember whether it's on by default for CF 9.

By the way, you should really not still be using CF 9. I'm sure you already know that, but I figured I'd say it anyway.

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 09, 2019 Jan 09, 2019

Copy link to clipboard

Copied

No doubt you are right about CF 9 Dave.  We do have some customers who are very reluctant to change, so here we are.  We're mostly on CF 2016 though.

In any case, I'll head back over to the server and see what my options are regarding caching, and post back with the results.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 09, 2019 Jan 09, 2019

Copy link to clipboard

Copied

LATEST

As Dave says, you can clear class and component cache on the caching page in the ColdFusion Administrator.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation