Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Flex 2, FDS 2.5 and CF 8: Still can't execute any kind of WebService!!!

Avatar

Former Community Member
Hi everyone,



I am starting to retract my brain from an intense 2 days to figure out how to use Flex with Coldfusion. I am using Coldfusion 8 Beta (this part is good, don't need help for CF itself). I am also using Flex Builder 2 (with chart but this not the topic). I installed FDS 2.5 before to install ColdFusion 8 but I think CF8 have is own FDS or something like that... anyway, it might help to mention it!



Well, I tried HTTPService, RemoteObject, WebSer vice - NOTHING WORKS!!! Argh! Did I mention I spent 2 days? ;-)))



Well, I start with the basic: a login form with an email (as a username) and a password to be validated. I have a CFC to do the validation and return a simple message (string): "OK' when it is valid and a custom message when it is not valid; depending if it is the password and/or the email which is not valid.



I always got an error. Since the error is different depending of the method I use, I will explain the latest method I used in this message and try to concentrate on that method specifically! The method is WebService and here is the error:



faultCode:Server.Error.Request

faultString:'HTTP request error'

faultDetail: 'Error: [IOErrorEvent type="ioError"

bubbles:false cancelable=false eventPhase=2

text="Error #2032: Stream Error . URL=http://localhost:8501/iDashboard/login.cfc"].

URL: http://localhost:8501/iDashboard/login.cfc'



Any help will be very useful!!!



Thank's



P.S.: I succeed to execute a HTTPService only if I call a XML file.
1 Reply

Avatar

Former Community Member
You can connect Flex to CF with out the use of LCDS(FDS)<br />So a better place to look for answers to you question would be the Flex forums.<br />with that said make sure your Flex project is setup to use Coldfusion Flash Remoting Services.<br /><br />Then create a remote object in your mxml file<br /><mx:RemoteObject<br /> id="serv"<br /> destination="ColdFusion"<br /> source="path.toYour.cfc" <br /> showBusyCursor="true"> <br /> <mx:method name="nameOfFunctionOnCFC" result="resultHandlerFunction(event)" fault="Alert.show(event.fault.message)"/><br /> </mx:RemoteObject><br /><br />create the handler function<br /><br />private function resultHandlerFunction(event:Event):void{<br /> //do something with your results<br />}<br /><br />then make the call to the service<br /><br />serv.nameOfFunctionOnCFC(email,password);<br /><br />that should work if your paths to your CF server is correct.<br /><br />Russ