I am using cfajaxproxy to create a JS object for a simple CFC. Whenever I attempt to invoke any method in this component, I get this error message in both the ColdFusion Ajax Logger window and in Firebug:
The method GET was not found in component c:\mypath\mycomponent.cfc
Of course, there is no method named "get" in this component and my code is not attempting to run a method by that name. Here's the code from the component:
<cfcomponent displayname="My Component" >
<cffunction name="test" access="remote" returntype="string" returnformat="JSON">
And here is the code in the script that calls this (which is located in a different subdirectory from the CFC):
<cfajaxproxy cfc="myPath.myComponent" jsclassname="oMP">
var objMP = new oMP();
<form NAME="frmMP" method="post" action="">
<input type="button" value="test" onclick="alert(objMP.test(384));return true;">
There are no problems when I invoke this test method in cfscript by instantiating the component and then calling the function.
Anyone have any clues as to what might be going on here? What is the significance of the reference to the GET method? Does this have something to do with HTTP GET?
Here's one more clue from the ColdFusion Ajax Logger window. This is the "info:" type entry that appears in the logger just before the error message.
http: HTTP GET /myDir/myComponent.cfc?method=test&returnFormat=json&argumentCollection=%7B%22CityID%22%3 A%22347%22%7D&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=DEC69B3E82CDD8762555CBECEA295 069&_cf_rc=1
This makes me wonder if there is some issue with HTTP GET. Perhaps some kind of server configuration issue. BTW, this is a newly configured CF9 server.
Just out of curiosity, what happens if you try an consume your component method using a RESTful style URL call in a browser:
Do you get an error or do you receive your expected results in JSON format?