Reply to topic
CFC not being found
palyne


Joined: 23 Oct 2006
Posts: 20
Reply with quote
Hi. This is probably a code issue but reading the web isn't finding me the answer.

I found a neat cfc online I wanted to use. I have only used a cfc with CFGRID, where it has a "bind" attribute, so I didn't know how to call it. After awhile of reading I concluded I should be using "CFINVOKE" for this and finally worked out a simple call to the CFC.

I have a simple form which asks for a word or phrase. It submits (form post cfform) to a tempate which sets a variable of "myidea" (string).

In that template, it then calls the cfc, like so:

Code:
 
         <cfinvoke
          component="cf_googleImages.cfc"
          method="getImage"
          returnVariable="myImage"
          Search_Criteria="#variables.myidea#"
        >


The CFC file is sitting IN THE SAME DIRECTORY with this little CFM template. But it's not finding it! Gah! It's driving me mad! Smile

So I made the component filename include a full path from the root of the server (C:\...) and that doesn't work either. So I made a URL-style path from root (http://...) and that doesn't work either. So I went back to just being the filename in the same directory and it still doesn't find it. The error I get is:

Code:

Could not find the ColdFusion Component or Interface cf_googleImages.cfc.
Ensure that the name is correct and that the component or interface exists.
 
The error occurred in C:\{path\filename}: line 27

25 :           method="getImage"
26 :           returnVariable="myImage"
27 :           Search_Criteria="#variables.myidea#"
28 :         >


Maybe I shouldn't use CFINVOKE? Maybe I'm supposed to be adding some kind of BIND parameter to my actual form text field, or submit or something -- is that possible to do this kind of thing that way?? Maybe there is something special I need to do related to the cfc?

I would hugely appreciate any help. Man it drives me nuts when some stupid little stuff just stops me in my tracks!

Best,
Palyne
cfsearching


Joined: 27 Jul 2008
Posts: 29
Reply with quote
If the cfc is in the same directory, that almost certainly rules out a path issue.


<cfinvoke
component="cf_googleImages.cfc" ...>


Leave off the ".cfc" file extension. ie Just use: component="cf_googleImages"
CFC not being found
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic