Skip to main content
robertd29648257
Participant
January 2, 2019
Question

CF 9 Web Service Stubs re-compile nightly

  • January 2, 2019
  • 2 replies
  • 581 views

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

    This topic has been closed for replies.

    2 replies

    rau kemc30261
    Participant
    January 8, 2019

    Ok

    BKBK
    Community Expert
    Community Expert
    January 9, 2019

    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.

    robertd29648257
    Participant
    January 9, 2019

    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?

    BKBK
    Community Expert
    Community Expert
    January 6, 2019

    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.

    robertd29648257
    Participant
    January 8, 2019

    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.

    WolfShade
    Legend
    January 8, 2019

    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,

    ^ _ ^