CFHTTP Raw Request
I have a process that is sending xml via cfhttp and I am not getting the anticipated response from the web service. I would like to see the actual headers and the body of the request. Does anyone know if there is a way to track the raw request that is created by a cfhttp post? Thanks, Donnie Carvajal ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359412 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFHTTP Raw Request
If you are doing this on a developer machine, install fiddler. Then you can watch everything the request and response and look at the raw outputs. It has saved me multiple times from pulling my hair out. Steve -Original Message- From: Donnie Carvajal [mailto:donnie.carva...@transformyx.com] Sent: Wednesday, October 08, 2014 12:17 PM To: cf-talk Subject: CFHTTP Raw Request I have a process that is sending xml via cfhttp and I am not getting the anticipated response from the web service. I would like to see the actual headers and the body of the request. Does anyone know if there is a way to track the raw request that is created by a cfhttp post? Thanks, Donnie Carvajal ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359413 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF11 changes to Application.cfc - no mappings defined?
Hi Folks Our single CF11 test server just highlighted a freaky difference between CF10 and CF11 that has us all puzzled. (We are running CF11 with the latest service pack.) It appears that the CF mappings defined in CFIDE (such as /cfc - root dir for all of our CFC's) are not defined inside the block of code at the top of Application.cfc (outside of any method in Application.cfc). This means we can't instantiate CFC's under the /cfc directory in that top script block area. We know we can create CFC's in onApplicationStart(), but we currently use a CFC to set the Application's this.name and this.setDomainCookies, etc. variables, and I think those can only be changed right at the top of Application.cfc. Is this a bug or something? Why would globally-defined mappings not be available at the top of Application.cfc? (BTW, the per-Application this.mappings are also ignored in that top script block, so that's not a help either.) Thanks Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359414 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFHTTP Raw Request
Try the getpagecontext or getmetadata functions. On Wed, Oct 8, 2014 at 17:17 PM, Donnie Carvajal donnie.carva...@transformyx.com wrote: I have a process that is sending xml via cfhttp and I am not getting the anticipated response from the web service. I would like to see the actual headers and the body of the request. Does anyone know if there is a way to track the raw request that is created by a cfhttp post? Thanks, Donnie Carvajal ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359415 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF11 changes to Application.cfc - no mappings defined?
Mark, When you say global mappings, are you saying that you created a mapping in the ColdFusion admin? Also, can you maybe share some of your Application.cfc code for us to get a better idea as to what you are trying to accomplish? On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau...@ihs.com wrote: Hi Folks Our single CF11 test server just highlighted a freaky difference between CF10 and CF11 that has us all puzzled. (We are running CF11 with the latest service pack.) It appears that the CF mappings defined in CFIDE (such as /cfc - root dir for all of our CFC's) are not defined inside the block of code at the top of Application.cfc (outside of any method in Application.cfc). This means we can't instantiate CFC's under the /cfc directory in that top script block area. We know we can create CFC's in onApplicationStart(), but we currently use a CFC to set the Application's this.name and this.setDomainCookies, etc. variables, and I think those can only be changed right at the top of Application.cfc. Is this a bug or something? Why would globally-defined mappings not be available at the top of Application.cfc? (BTW, the per-Application this.mappings are also ignored in that top script block, so that's not a help either.) Thanks Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359416 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF11 changes to Application.cfc - no mappings defined?
On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau...@ihs.com wrote: It appears that the CF mappings defined in CFIDE (such as /cfc - root dir for all of our CFC's) are not defined inside the block of code at the top of Application.cfc I would also test this with a global mapping not called cfc. That word may be reserved in CF11. I have no idea if it is, but it would be super easy for you to test. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitter http://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359417 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CF11 changes to Application.cfc - no mappings defined?
Hi Dean Yes, we defined mappings in the CF Admin. These mappings all work outside of the top script block, but not in it. Here's a sketch of what currently works on CF10: cfcomponent name=MyApplication output=false cfscript // All of these settings can be done by the configureAppSettings() call below... // this.name = App; // this.clientManagement = true; // this.sessionManagement = true; // this.setClientCookies = false; // this.applicationTimeout = createTimeSpan(2, 0, 0, 0); // this.setDomainCookies = true; createObject(component, cfc.ApplicationSettings).configureAppSettings(app=this); public void function onApplicationStart() { this.applicationManager.onApplicationStart(); } public void function onRequestStart() { application.applicationManager.onRequestStart(); } /cfscript /cfcomponent -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Wednesday, October 08, 2014 2:13 PM To: cf-talk Subject: Re: CF11 changes to Application.cfc - no mappings defined? Mark, When you say global mappings, are you saying that you created a mapping in the ColdFusion admin? Also, can you maybe share some of your Application.cfc code for us to get a better idea as to what you are trying to accomplish? On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau...@ihs.com wrote: Hi Folks Our single CF11 test server just highlighted a freaky difference between CF10 and CF11 that has us all puzzled. (We are running CF11 with the latest service pack.) It appears that the CF mappings defined in CFIDE (such as /cfc - root dir for all of our CFC's) are not defined inside the block of code at the top of Application.cfc (outside of any method in Application.cfc). This means we can't instantiate CFC's under the /cfc directory in that top script block area. We know we can create CFC's in onApplicationStart(), but we currently use a CFC to set the Application's this.name and this.setDomainCookies, etc. variables, and I think those can only be changed right at the top of Application.cfc. Is this a bug or something? Why would globally-defined mappings not be available at the top of Application.cfc? (BTW, the per-Application this.mappings are also ignored in that top script block, so that's not a help either.) Thanks Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359418 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CF11 changes to Application.cfc - no mappings defined?
Hi Cameron We can successfully use the /cfc mapping outside of the top script block, so I don't think it is reserved in that way. We also observed that expandPath() behaves differently in the top script block vs in a Application.cfc method. (It expands the mappings paths properly in the method, but doesn't know any mappings in the top script block.) Pretty weird... Thanks Mark -Original Message- From: Cameron Childress [mailto:camer...@gmail.com] Sent: Wednesday, October 08, 2014 2:33 PM To: cf-talk Subject: Re: CF11 changes to Application.cfc - no mappings defined? On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau...@ihs.com wrote: It appears that the CF mappings defined in CFIDE (such as /cfc - root dir for all of our CFC's) are not defined inside the block of code at the top of Application.cfc I would also test this with a global mapping not called cfc. That word may be reserved in CF11. I have no idea if it is, but it would be super easy for you to test. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitter http://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359419 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF11 changes to Application.cfc - no mappings defined?
Hmm, that is odd. It may very well be a bug. I don't know for sure if the location of where you define the application properties is restricted to the top of your Application.cfc or not, but here are two things to try. Placing the calling of your configuration cfc inside your onApplicationStart() method: cfcomponent name=MyApplication output=false cfscript public void function onApplicationStart() { tcreateObject(component, cfc.ApplicationSettings).configureAppSettings(app=this); this.applicationManager.onApplicationStart(); } public void function onRequestStart() { application.applicationManager.onRequestStart(); } /cfscript /cfcomponent Or add an additional mapping above the call to the config cfc. cfcomponent name=MyApplication output=false cfscript THIS.mappings[/cfc]=path-to-cfc-folder; createObject(component, cfc.ApplicationSettings).configureAppSettings(app=this); public void function onApplicationStart() { this.applicationManager.onApplicationStart(); } public void function onRequestStart() { application.applicationManager.onRequestStart(); } /cfscript /cfcomponent On Wed, Oct 8, 2014 at 2:39 PM, Gaulin, Mark mark.gau...@ihs.com wrote: Hi Dean Yes, we defined mappings in the CF Admin. These mappings all work outside of the top script block, but not in it. Here's a sketch of what currently works on CF10: cfcomponent name=MyApplication output=false cfscript // All of these settings can be done by the configureAppSettings() call below... // this.name = App; // this.clientManagement = true; // this.sessionManagement = true; // this.setClientCookies = false; // this.applicationTimeout = createTimeSpan(2, 0, 0, 0); // this.setDomainCookies = true; createObject(component, cfc.ApplicationSettings).configureAppSettings(app=this); public void function onApplicationStart() { this.applicationManager.onApplicationStart(); } public void function onRequestStart() { application.applicationManager.onRequestStart(); } /cfscript /cfcomponent -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Wednesday, October 08, 2014 2:13 PM To: cf-talk Subject: Re: CF11 changes to Application.cfc - no mappings defined? Mark, When you say global mappings, are you saying that you created a mapping in the ColdFusion admin? Also, can you maybe share some of your Application.cfc code for us to get a better idea as to what you are trying to accomplish? On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau...@ihs.com wrote: Hi Folks Our single CF11 test server just highlighted a freaky difference between CF10 and CF11 that has us all puzzled. (We are running CF11 with the latest service pack.) It appears that the CF mappings defined in CFIDE (such as /cfc - root dir for all of our CFC's) are not defined inside the block of code at the top of Application.cfc (outside of any method in Application.cfc). This means we can't instantiate CFC's under the /cfc directory in that top script block area. We know we can create CFC's in onApplicationStart(), but we currently use a CFC to set the Application's this.name and this.setDomainCookies, etc. variables, and I think those can only be changed right at the top of Application.cfc. Is this a bug or something? Why would globally-defined mappings not be available at the top of Application.cfc? (BTW, the per-Application this.mappings are also ignored in that top script block, so that's not a help either.) Thanks Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359420 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF11 changes to Application.cfc - no mappings defined?
On Wed, Oct 8, 2014 at 2:42 PM, Gaulin, Mark wrote: We can successfully use the /cfc mapping outside of the top script block, so I don't think it is reserved in that way. You are probably right but it may still be worth testing out, since the very root of your problem is that something in the psudoconstructor is already behaving differently than it does in onApplicationStart(). -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitter http://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359421 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CF11 changes to Application.cfc - no mappings defined?
Yup, I tried setting this.mappings as you suggest and it didn't change anything. We are getting the strong feeling that no mappings are applied, even the ones configured in CF Admin, until after the top script block has completed. That explains all of the behavior that we see. Hmm.. this looks like a relevant bug: https://bugbase.adobe.com/index.cfm?event=bugid=3783403 It is marked fixed but it sounds like it isn't released yet Thanks Mark -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Wednesday, October 08, 2014 3:12 PM To: cf-talk Subject: Re: CF11 changes to Application.cfc - no mappings defined? Hmm, that is odd. It may very well be a bug. I don't know for sure if the location of where you define the application properties is restricted to the top of your Application.cfc or not, but here are two things to try. Placing the calling of your configuration cfc inside your onApplicationStart() method: cfcomponent name=MyApplication output=false cfscript public void function onApplicationStart() { tcreateObject(component, cfc.ApplicationSettings).configureAppSettings(app=this); this.applicationManager.onApplicationStart(); } public void function onRequestStart() { application.applicationManager.onRequestStart(); } /cfscript /cfcomponent Or add an additional mapping above the call to the config cfc. cfcomponent name=MyApplication output=false cfscript THIS.mappings[/cfc]=path-to-cfc-folder; createObject(component, cfc.ApplicationSettings).configureAppSettings(app=this); public void function onApplicationStart() { this.applicationManager.onApplicationStart(); } public void function onRequestStart() { application.applicationManager.onRequestStart(); } /cfscript /cfcomponent On Wed, Oct 8, 2014 at 2:39 PM, Gaulin, Mark mark.gau...@ihs.com wrote: Hi Dean Yes, we defined mappings in the CF Admin. These mappings all work outside of the top script block, but not in it. Here's a sketch of what currently works on CF10: cfcomponent name=MyApplication output=false cfscript // All of these settings can be done by the configureAppSettings() call below... // this.name = App; // this.clientManagement = true; // this.sessionManagement = true; // this.setClientCookies = false; // this.applicationTimeout = createTimeSpan(2, 0, 0, 0); // this.setDomainCookies = true; createObject(component, cfc.ApplicationSettings).configureAppSettings(app=this); public void function onApplicationStart() { this.applicationManager.onApplicationStart(); } public void function onRequestStart() { application.applicationManager.onRequestStart(); } /cfscript /cfcomponent -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Wednesday, October 08, 2014 2:13 PM To: cf-talk Subject: Re: CF11 changes to Application.cfc - no mappings defined? Mark, When you say global mappings, are you saying that you created a mapping in the ColdFusion admin? Also, can you maybe share some of your Application.cfc code for us to get a better idea as to what you are trying to accomplish? On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau...@ihs.com wrote: Hi Folks Our single CF11 test server just highlighted a freaky difference between CF10 and CF11 that has us all puzzled. (We are running CF11 with the latest service pack.) It appears that the CF mappings defined in CFIDE (such as /cfc - root dir for all of our CFC's) are not defined inside the block of code at the top of Application.cfc (outside of any method in Application.cfc). This means we can't instantiate CFC's under the /cfc directory in that top script block area. We know we can create CFC's in onApplicationStart(), but we currently use a CFC to set the Application's this.name and this.setDomainCookies, etc. variables, and I think those can only be changed right at the top of Application.cfc. Is this a bug or something? Why would globally-defined mappings not be available at the top of Application.cfc? (BTW, the per-Application this.mappings are also ignored in that top script block, so that's not a help either.) Thanks Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359422 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFML restart ACF 10 app server service
It doesn't make sense to do it from cf scheduler because if CF is locked up it won't execute. The windows scheduler always will! At 07:21 PM 10/1/2014, Russ Michaels wrote: Just use the previously mentioned commands that is all you need On Wed, Oct 1, 2014 at 22:57 PM, John M Bliss bliss.j...@gmail.com wrote: Care to share the batch file? On Oct 1, 2014 5:56 PM, Russ Michaels r...@michaels.me.uk javascript:; wrote: we have a batch file which we run via a windows scheduled task, we don't do it via CF. On Wed, Oct 1, 2014 at 7:10 PM, John M Bliss bliss.j...@gmail.com javascript:; wrote: And do you do it the way Gerald recommended...? On Wed, Oct 1, 2014 at 12:16 PM, Russ Michaels r...@michaels.me.uk javascript:; wrote: we have a scheduled task setup to restart CF every morning. Since we have done this we have hardly any cf issues any more. On Wed, Oct 1, 2014 at 3:46 PM, Gerald Guido gerald.gu...@gmail.com javascript:; wrote: I don't know if this is the best way but you can put the following text in a .bat file and run it using cfexecute. net stop ColdFusion 10 Application Server net start ColdFusion 10 Application Server cfexecute name = C:\somefolder\yourbatfile.bat /cfexecute HTH G! *Gerald Anthony Guido* Nullius in verba http://en.wikipedia.org/wiki/Nullius_in_verba -- Horace learn.geraldguido.com Twitter https://twitter.com/CozmoTrouble Facebook https://www.facebook.com/gerald.guido.9 On Wed, Oct 1, 2014 at 9:22 AM, John M Bliss bliss.j...@gmail.com javascript:; wrote: Hi. What's the current best way to use CFML to restart ACF 10 app server service (on Windows server)? -- John Bliss - http://www.linkedin.com/in/jbliss ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359423 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm