I recently learned about a neat feature of Coldspring that allows me to create remote proxy's of beans. I went through the doc and set everything up per examples, and my remote proxy's were generated, woohoo! So, I setup my function to return a proper value and I bind a cfgrid to the remote object. I invoke it, and get:
CFGRID: The response is empty
Weird.. so I try to call the CFC directly in the url, and I get a completely blank page. Fast forward about 2 hours of digging through CF and IIS logs trying to figure out why no error is being throw and no output is being displayed, then I find a web post about using cfc's and the onRequest function. For some reason, if you have anything in your onRequest, your call to the remote cfc will fail and give you an illuminating blank response! Here is what I placed in my onRequestStart function to fix it up, and now remoting and web service requests are working perfectly ;)
<cfargument name="thePage" type="string" required="true">
<!---// Necessary code to determine if a cfc is being requested and
remove the onRequest function from this currently running process,
otherwise a blank page gets returned and no error thrown //--->
<cfif listLast(arguments.thePage, '.') eq 'cfc' OR isSOAPRequest()>
<cfset StructDelete( THIS, "OnRequest" ) />
</cfif>
<cfreturn true>
</cffunction>








#1 by justin - March 6, 2008 at 10:19 AM
#2 by John Fitzgerald - October 27, 2008 at 11:49 PM