You could inspect the cgi.script_name -- if the CFC is being called directly it should be found there, whereas if it's being called from another CFM/CFC it won't be.
Alternatively, you could see if getBaseTemplatePath() EQ getCurrentTemplatePath() -- if those are the same, it should mean the CFC is being directly requested (implying remote) vs. being called from another page. I think that's probably the cleanest method. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Alexander Sherwood > Sent: Monday, May 10, 2004 11:08 AM > To: [EMAIL PROTECTED] > Subject: Re: [CFCDev] Determining invocation method of a CFC? > > > At 01:54 PM 5/10/2004, you wrote: > >On May 10, 2004, at 10:50 AM, Alexander Sherwood wrote: > >>I know that GetMetaData() will tell you which methods are set for > >>"remote" access, but is there a common way developers programmatically > >>check the manner in which a CFC's method is called (remote vs. local)? > > > >http://www.macromedia.com/support/coldfusion/ts/documents/ > webservices_header.htm > > > Thanks Sean. > > Quick questions: does "remote" invocation strictly signify a > SOAP-based request or can a CFC called via a form submission > (component.cfc?method=test) be considered a "remote" request as well? > > I would assume the IsViaSOAP() function mentioned in the Tech > Note just looks for SOAP headers. If this is the case, would it > be safe to assume that one cannot differentiate between a FORM > post to a CFC and a local call from a CFC page? > > Thanks, > > -- > Alex > > > >Regards, > >Sean > > > >---------------------------------------------------------- > >You are subscribed to cfcdev. To unsubscribe, send an email > >to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in > the message of the email. > > > >CFCDev is run by CFCZone (www.cfczone.org) and supported > >by Mindtool, Corporation (www.mindtool.com). > > > >An archive of the CFCDev list is available at > www.mail-archive.com/[EMAIL PROTECTED] > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]