August 20, 2008
For ColdFusion hosting try HostMySite.com. |
Home /
Groups /
ColdFusion Talk (CF-Talk)
Forcing a CFC to refresh
Boy I hate developing with CFCs..Les Mizzell 04/15/08 02:42 P Develop locally? There's a reason CF Enterprise is free for development.Barney Boisvert 04/15/08 02:44 P In Application.cfc, just have an if statement that checks for theNicholas M Tunney 04/15/08 02:51 P If you have access to the CF Admin, turn off all of the template options forScott Stewart 04/15/08 02:50 P It doesn't have anything to do with CFCs. ColdFusion has always cached webBrian Kotek 04/15/08 03:04 P > And as Barney said, doing development on a shared server is just silly whenLes Mizzell 04/15/08 03:57 P I'd have an issue with anyone who forced such a setup on me. You might askBrian Kotek 04/15/08 05:50 P > And again, just to be clear to anyone else who might read the thread, theLes Mizzell 04/15/08 06:56 P > Nic's solution is probably not going to do anything for you, because evenLes Mizzell 04/15/08 07:33 P You need to refresh the webservice stubs, not the CFC.James Holmes 04/15/08 09:16 P Develop locally but if you want to force to refresh a webservice tryJoão_Fernandes 04/15/08 03:59 P I believe refreshWSDL was added in CF8. For earlier version, this blog postQasim Rasheed 04/15/08 05:15 P Besides deleting the web service from ColdFusion administrator, there isBrad Wood 04/15/08 03:44 P > (all congressman websites have to be on secureDave Watts 04/16/08 12:56 P > Actually, this is incorrect. Congressional websites are hosted and managedLes Mizzell 04/16/08 02:01 P All the form scrubbing may be a pain, but it's not a bad idea. That'sBrad Wood 04/16/08 02:43 P > Not using AT LEAST CF 7 is retardo though. I'm sure theyDave Watts 04/16/08 05:27 P > Hmm - getting off topic - but the one Congressman site I'veDave Watts 04/16/08 05:33 P Boy I hate developing with CFCs.. Make an edit, test, make another edit - the darned thing doesn't refresh. The only way I've found around this is to keep saving it under a new name, and retest using the new name each time <cfset request.cfcLOCATION="https://mysite.com/version1.cfc?wsdl"> <cfset request.cfcLOCATION="https://mysite.com/version2.cfc?wsdl"> <cfset request.cfcLOCATION="https://mysite.com/version3.cfc?wsdl"> ... and so forth. What a PITA!! Is there any way (on a shared server that I've very little access to beyond FTP) to *force* a CFC to refresh, or is this just the nature of the beast? Develop locally? There's a reason CF Enterprise is free for development. On Tue, Apr 15, 2008 at 11:42 AM, Les Mizzell <lesmizz@bellsouth.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- -- Barney Boisvert bboisvert@gmail.com http://www.barneyb.com/ Got Gmail? I have 100 invites. In Application.cfc, just have an if statement that checks for the existence of a url variable. if the url variable exists, call onApplicationStart() and onSessionStart() explicitly. This will reload all scoped CFCs. Nic Barney Boisvert wrote: ----- Excess quoted text cut - see Original Post for more ----- -- Nicholas M. Tunney Blog: http://www.nictunney.com Adobe Certified Advanced ColdFusion MX7 Developer Adobe Certified Instructor Adobe Community Expert If you have access to the CF Admin, turn off all of the template options for your dev environment. -- Scott Stewart ColdFusion Developer SSTWebworks 4405 Oakshyre Way Raleigh, NC. 27616 (919) 874-6229 (home) (703) 220-2835 (cell) Boy I hate developing with CFCs.. Make an edit, test, make another edit - the darned thing doesn't refresh. The only way I've found around this is to keep saving it under a new name, and retest using the new name each time <cfset request.cfcLOCATION="https://mysite.com/version1.cfc?wsdl"> <cfset request.cfcLOCATION="https://mysite.com/version2.cfc?wsdl"> <cfset request.cfcLOCATION="https://mysite.com/version3.cfc?wsdl"> .... and so forth. What a PITA!! Is there any way (on a shared server that I've very little access to beyond FTP) to *force* a CFC to refresh, or is this just the nature of the beast? It doesn't have anything to do with CFCs. ColdFusion has always cached web services so it doesn't have to keep re-requesting and re-parsing the WSDL. Please, do some research before you run out to a list and condemn something that actually has nothing to do with your problem. And as Barney said, doing development on a shared server is just silly when you can (and should) be doing it locally. On Tue, Apr 15, 2008 at 2:42 PM, Les Mizzell <lesmizz@bellsouth.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- > And as Barney said, doing development on a shared server is just silly when > you can (and should) be doing it locally. I know I can develop locally - but a several specific functions I'm working on must come from a *specific* https address, or any incoming cfhttp is rejected. This address is already defined and I don't have access to change it, so I've no choice but to develop as much as I can locally, and test from the actual server using the real address for the submitting pages in question. I think Nic has my solution though. Off to see what happens... I'd have an issue with anyone who forced such a setup on me. You might ask them how you're expected to develop a solution when they can't or won't even allow for a proper development flow. Basically it sounds like the decision to work with an external system that limits your IP address to a single IP, combined with the decision to develop on a server that you have no control over, is turning out to be a pretty unacceptable combination. Nic's solution is probably not going to do anything for you, because even reloading the CFC instance that is the source of the web service isn't going to cause CF itself to refresh the actual web service it has cached. If you aren't on CF8 and able to use the refreshWSDL flag, and you also aren't able to access the administrator to cycle the cached web service, then I'm afraid you're out of options aside from manually recreating separate versions of the target CFC every time you make a change. And again, just to be clear to anyone else who might read the thread, the problem has nothing to do with using CFCs at all. It's an issue with ColdFusion's caching of all web services combined with a difficult environment setup. On Tue, Apr 15, 2008 at 3:58 PM, Les Mizzell <lesmizz@bellsouth.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- > And again, just to be clear to anyone else who might read the thread, the > problem has nothing to do with using CFCs at all. It's an issue with > ColdFusion's caching of all web services combined with a difficult > environment setup. Thanks ... Believe me - this isn't the worse development environment I've got either! Anybody got a RSA SecurID generating numbers every 60 seconds for server access? I've got four different ones - and they all look alike! Anybody do any US government development? Like a congressman's website? You wouldn't *believe* the security hurdles you've got to jump through just to post a new version of a file to the server (all congressman websites have to be on secure Whitehouse servers...ACK!)! You can decide to take work or not - and so far the "difficult development environment" folks I deal with also happen to have deep pockets and don't mind reaching in as often as necessary for my extra trouble. And believe me, I *charge* them well for the extra trouble! > Nic's solution is probably not going to do anything for you, because even > reloading the CFC instance that is the source of the web service isn't going > to cause CF itself to refresh the actual web service it has cached. Even deleting the file - refreshing the page to throw and error, and reloading the file again doesn't work. When these things get cached, they freaking get cached!!! You need to refresh the webservice stubs, not the CFC. As people have said before, this is nothing to do with the CFC - it's actually the client end of the webservice transaction that's doing the caching. <cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory"> <cfset RpcService = factory.XmlRpcService> <cfset RpcService.refreshWebService("http://somesite/somecfc.cfc?wsdl")> The above assumes you can't do it any of the better ways (admin API, the CF8 way in one of the earlier posts, etc). On Wed, Apr 16, 2008 at 7:33 AM, Les Mizzell <lesmizz@bellsouth.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ Develop locally but if you want to force to refresh a webservice try <cfset ws = createObject('webservice', someUrl, { refreshWSDL="yes" } )> -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org Portugal Adobe User Group (http://aug.riapt.org) I believe refreshWSDL was added in CF8. For earlier version, this blog post might help you. http://www.bpurcell.org/blog/index.cfm?mode=entry&ENTRY=965 HTH 2008/4/15 João_Fernandes <joaopedromartinsfernandes@gmail.com>: ----- Excess quoted text cut - see Original Post for more ----- Besides deleting the web service from ColdFusion administrator, there is some Admin API functionality that will do it programmatically but you will obviously need the CF Admin password to use it. ~Brad > Is there any way (on a shared server that I've very little access to > beyond FTP) to *force* a CFC to refresh, or is this just the nature of > the beast? > (all congressman websites have to be on secure > Whitehouse servers...ACK!)! Actually, this is incorrect. Congressional websites are hosted and managed by the US Senate Sergeant-at-Arms office (which is also a kickass CF shop). Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/ > Actually, this is incorrect. Congressional websites are hosted and managed > by the US Senate Sergeant-at-Arms office (which is also a kickass CF shop). Hmm - getting off topic - but the one Congressman site I've got - they gave me a freaking FIT over using Coldfusion, and said that *only* version 5 was "approved". I couldn't use anything else. I had to put so much regex all over forms to block "bad" stuff and pass their security scans that it was ridiculous. Using "cfqueryparam", or any other Coldfusion validation/security didn't matter at all - if there wasn't regx there to scrub *every* single variable on the site, it wouldn't pass the scans and they wouldn't allow the file to go live. Isn't a fun client due to whomever is the server admin, believe me!!! Maybe they were just p*ssed that somebody outside their regular circle got to develop the site, I dunno... All the form scrubbing may be a pain, but it's not a bad idea. That's the stuff most people overlook. We are in the title business and our public facing sites sanitize all form and URL variables to make our customers happy about security. (Mostly Lenders) Not using AT LEAST CF 7 is retardo though. I'm sure they probably have a few miles of red tape in the way. I know the government supposedly uses a lot of ColdFusion which is pretty cool. I don't know if it's true, but I read once that Windows XP didn't have any Easter eggs because the government used it and they couldn't use ANY code with "undocumented features". Go figure. ~Brad > Actually, this is incorrect. Congressional websites are hosted and managed > by the US Senate Sergeant-at-Arms office (which is also a kickass CF shop). Hmm - getting off topic - but the one Congressman site I've got - they gave me a freaking FIT over using Coldfusion, and said that *only* version 5 was "approved". I couldn't use anything else. I had to put so much regex all over forms to block "bad" stuff and pass their security scans that it was ridiculous. > Not using AT LEAST CF 7 is retardo though. I'm sure they > probably have a few miles of red tape in the way. I know the > government supposedly uses a lot of ColdFusion which is pretty cool. Many agencies (and non-governmental organizations too, for that matter) have long and complex requirements for software acceptance, so upgrades are slow. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/ > Hmm - getting off topic - but the one Congressman site I've > got - they gave me a freaking FIT over using Coldfusion, and > said that *only* version 5 was "approved". I couldn't use > anything else. That's odd, because I'm pretty sure SAA uses a later version - they support SOAP services. They're pretty good about keeping on top of new technologies. They even have their own internal web conference! ----- Excess quoted text cut - see Original Post for more ----- This isn't entirely a bad thing, although you should also be required to use CFQUERYPARAM. CFQUERYPARAM won't help block XSS attacks. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||