September 24th, 2007 by Kyle
Tags: cfc, cfcs, cfmx7.0.2, ColdFusion, fds, Flex, Flex Builder, flex-2.0, flex-data-services, flex-sdk, flex2.0.1, host-my-site, hostmysite, hostmysite.com, mxml, remote-object, remoteobject, rpc, web-services, webservices
Posted in: ColdFusion, Flex
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.
<mx :Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" >
</mx><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>
<mx :WebService id="myService"
useProxy="false"
wsdl="http://739saintlouis.com/services/HelloWorld.cfc?wsdl"
showBusyCursor="true">
<mx
</mx>
<mx :Label id="lblStringResult" text="{sResult}"/>
<mx :Button label="get String via Webservice" click="myService.sayHelloString.send()"/>
Browse the source of this example.
Download a zipfile containing the source to this sample.
2 Comments »

Recent Comments