House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Application cfc - normal request or web service?

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Hugo Ahlenius
11/28/2008 06:06 AM

Hi, Is there any way that the processing (e.g. OnRequestStart) can know about the request to figure out if it is a web service call (calling a component as a web service) or a normal/plain .cfm request? I guess one can always parse this from the CGI path variables - just curious if anyone knew about any more "clean" way... Cheers, Hugo -- Hugo Ahlenius ------------------------------------------------------------- Hugo Ahlenius            E-Mail: hugo.ahlenius(at)nordpil.com Managing Director        Phone:                +46 8 674 7564 Nordpil                  Fax:                  +46 8 674 7020 http://nordpil.com       Mobile:               +46 733 467111                          Skype:              callto:fraxxinus -------------------------------------------------------------

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jochem van Dieten
11/28/2008 05:59 PM

> Is there any way that the processing (e.g. OnRequestStart) can know about the request to figure out if it is a web service call (calling a component as a web service) or a normal/plain .cfm request? I guess one can always parse this from the CGI path variables - just curious if anyone knew about any more "clean" way... IsSOAPRequest(): http://livedocs.adobe.com/coldfusion/8/htmldocs/functions_in-k_32.html#5052211 Jochem

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Adam Haskell
11/28/2008 08:21 PM

This will only return true for web service calls to be clear there are other ways of calling a CFC via HTTP that this will return false, AMF for example (which Mark was just showing me last night this lovely example). Fusebox just looks at the extension in the target page in OnRequestStart:     <!--- ensure CFC / Web Service / Flex Remoting calls are not intercepted --->         <cfif right(arguments.targetPage,4) is ".cfc">             <cfset doCompile = false />             <cfset structDelete(variables,"onRequest") />             <cfset structDelete(this,"onRequest") />         </cfif> Adam On Fri, Nov 28, 2008 at 5:52 PM, Jochem van Dieten <jochemd@gmail.com>wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
s. isaac dealey
11/28/2008 08:35 PM

----- Excess quoted text cut - see Original Post for more ----- Works if called inside the webservice CFC ... unfortunately doesn't work if called from outside the CFC, such as in the onRequestStart. Not sure what Hugo's use case is. -- s. isaac dealey  ^  new epoch isn't it time for a change?      ph: 781.769.0723 http://onTap.riaforge.org/blog

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Hugo Ahlenius
12/01/2008 03:50 AM

| |> Is there any way that the processing (e.g. OnRequestStart) |can know about the request to figure out if it is a web |service call (calling a component as a web service) or a |normal/plain .cfm request? I guess one can always parse this |from the CGI path variables - just curious if anyone knew |about any more "clean" way... |IsSOAPRequest(): |http://livedocs.adobe.com/coldfusion/8/htmldocs/functions_in-k_ |32.html#5052211 Thanks Jochem and others, It was something like that I was looking for - but why does it return "no" when I do a http:/host/testobject.cfc?method=testfunction request through the browser... ? (CFMX8) Cheers, Hugo

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Azadi Saryev
12/01/2008 04:33 AM

because http:/host/testobject.cfc?method=testfunction request is NOT invoking a web service. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Hugo Ahlenius wrote: ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference