Expand my Community achievements bar.

RPC fault when calling a CFC from flex

Avatar

Level 1
Hello there,



I'm having some startup problems getting Flex and Colfusion 8
to play nice with FDS. I'm using Flexbuilder 2.0.1 and Coldfusion 8
developer edition on IIS on a windows box (XP professional).

I use a very simple test CFC in my coldfusion site with just
one function called 'getstring' which, surprise, surprise returns a
string. I want to show this string on a label in my Flex frontend
by using <mx:remoteobject>, the whole thing compiles
perfectly, I use this mxml:



<mx:RemoteObject id="TestService"

source="cfc.DataTest"

destination="ColdFusion"

concurrency="multiple"

makeObjectsBindable="true"

showBusyCursor="true">

<mx:method name="getString"
result="doResult(event.result)" fault="doFault(event.fault)"/>

</mx:RemoteObject>





but after calling the remote method I get this error back:



[RPC Fault faultString="coldfusion.xml.rpc.CFCServlet cannot
be cast to coldfusion.runtime.CFPage" faultCode="Server.Processing"
faultDetail="null"]



Which is the same type of error I get when I call a CFC
directly through the address bar in my browser, for example
http://localhost/cfc/datatest.cfc



I tried googling the error message but so far found nothing
that indicated what I'm doing wrong...



I'd really appreciate some help here, if you need more info
let me know...



thanx in advance
1 Reply

Avatar

Level 1
Ok, nevermind, I figured out what I was doing wrong. I had
accidentally setup my application.cfc in a wrong way, I had set all
of the onrequest en onapplication event handlers to
access="package" instead of "public", this generated an error
ofcourse...



I'll just go bang my head against a wall for a while
now....