September 5th, 2008 by Kyle
Tags: , , , , , ,
Posted in: ActionScript, Air, BlazeDS, Flex, LCDS


This really isn’t that difficult to do, but the docs regarding it are a little hard to find. I thought I’d post the link and then some links to other useful blog entries that have info to add on this topic.

Doc link: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=runtimeconfig_5.html#194376

One of Adobe’s platform evangelists has posted a blog entry that may be more clear:
http://raghuonflex.wordpress.com/2008/06/05/endpointatruntime/

There is also a “Flex cookbook” entry that may be of some use:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=9703




No Comments »

This post is to carry on from my previous post regarding moving data from ColdFusion CFCs to Flex 2 Applications Using Webservices.

Here is the first sample showing basic retrieval of a string via Remote Object:

< ?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" >
    <mx:script>
        < ![CDATA[
            import mx.rpc.events.ResultEvent;
            import mx.controls.Alert;
           
            [Bindable]
            public var sResult:String;
           
            public function handleStringResult(event:ResultEvent):void{
                sResult=event.result as String
            }
         
        ]]>
    </mx:script>
       
    <mx:remoteobject id="myService"
        destination="ColdFusion"
        source="services.HelloWorld">  
        <mx:method name="sayHelloString" result="handleStringResult(event)"  fault="Alert.show(event.fault.message)" />
    </mx:remoteobject>

    <mx:label id="lblStringResult" text="{sResult}"/>   
    <mx:button label="get String Remote Object" click="myService.sayHelloString()"/>

</mx:application>
 

This movie requires Flash Player 9

Browse the source of this example.
Download a zipfile containing the source to this sample.

Read the rest of this post»




1 Comment »

One of my first blog posts pointed to a dev center article that I wrote on this topic for the Flex 2 release. I often send customers to look at this article when appropriate as it is a good starting point for webservice and remoteobject communication between Flex and Coldfusion. I also find myself referring to this sample once in a while and so I have finally decided to host the sample and cfc from my website/blog and potentially enhance the cfc to support more use cases for subsequent blog posts.

< ?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" >
    <mx:script>
        < ![CDATA[
            import mx.rpc.events.ResultEvent;
            import mx.controls.Alert;
           
            [Bindable]
            public var sResult:String;
               
            public function handleStringResult(event:ResultEvent):void{
                sResult=event.result as String
            }
           
        ]]>
    </mx:script>
       
    <mx:webservice id="myService"
        useProxy="false"
        wsdl="http://739saintlouis.com/services/HelloWorld.cfc?wsdl"
        showBusyCursor="true">     
        <mx:operation name="sayHelloString" result="handleStringResult(event)" fault="Alert.show(event.fault.message)"/>
    </mx:webservice>
    <mx:label id="lblStringResult" text="{sResult}"/>   
    <mx:button label="get String via Webservice" click="myService.sayHelloString.send()"/>

</mx:application>
 

This movie requires Flash Player 9

Browse the source of this example.
Download a zipfile containing the source to this sample.

Read the rest of this post»




2 Comments »

I wrote this article for the Flex 2.0 release.
It is a good intro on how you can move data between Coldfusion 7.02 CFCs and Flex 2.0 using Web Services or Remote Object calls.

My co-worker, Lin Lin, blogged a good follow up to this article that expands up on the configuration and steps necessary to access cfcs on your Coldfusion server from a flex app on a separate server.




No Comments »