October 1st, 2007 by Kyle
Posted in: Flex, Coldfusion

This issue came to me from a customer who wanted to catch the timeout of a webservice and then repeatedly re-dispatch the same webservice passing the parameters/data from the original call, but with a larger timeout, until some max timeout or max number of tries was reached.

Read the rest of this post»


No Comments »

September 27th, 2007 by Kyle
Posted in: Flex, Coldfusion, Flex Data Services

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»


No Comments »

September 27th, 2007 by Kyle
Posted in: Flex, Coldfusion, Flex Data Services

  
I am using HostMySite as my web host and have the Linux Builder Plus CF package.
I haven’t upgraded to CF8 since that would require me to change my host package to use Windows. I don’t think I want that, since I like having SSH access to the machine my site is physically on.
I had just finished with my blog regarding Moving data from ColdFusion CFCs to Flex 2 Applications Using Webservices and was trying to get my code working on my site for the follow up article on Moving data from ColdFusion CFCs to Flex 2 Applications Using RemoteObject.
I was not being very successful and had even spoken with HostMySite support and they told me that accessing cfcs from Flex as RemoteObjects through the Flex Gateway with Coldfusion was not enabled and furthermore could not be enabled for a shared hosting account. If I wanted that functionality, I would have to upgrade to a VPS (Virtual Private Server) host package.

  
Now I pay about $65 per quarter for my host account for CF and Wordpress capabilities. The base VPS host package with Coldfusion starts at $116 a month. I don’t know about you, but that is quite a jump for me, so I decided to do a bit more digging around. As it turned out, I found a few forum entries that seemed to allude that it was possible. In fact, one person had even posted to a link in his hosted site where he actually had my dev center article remote object sample working! Unfortunately he didn’t quite say how he had accomplished such a feat.

  
Well I knew how I would deal with that mystery. I got out my trusty Web Debugging Proxy tool: Charles to sniff the request that the sample was making so I could see what the url was to the flex gateway. As it turns out, I was just missing a trailing slash on my flex2gateway URI!!!!!

The key to getting this to work revolves around 3 things:
1. Getting your config files located and configured properly for compilation.
2. Getting the fully qualified name for your cfc correct.
3. Knowing the endpoint URI for your Flex Gateway fro your Coldfusion server.

In Flex Builder in my project, I create the following 2 config files:

services-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<services-config>
    <services>
        <service-include file-path="remoting-config.xml" />
    </services>
    <channels>
        <channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://739saintlouis.com/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
            </properties>
        </channel-definition>
    </channels>
</services-config>
 

remoting-config.xml:


class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">






** Read the rest of this post»


No Comments »

September 24th, 2007 by Kyle
Posted in: Flex, Coldfusion

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»


No Comments »

February 2nd, 2007 by Kyle
Posted in: Flex, Coldfusion, Flex Builder, Flex Data Services, mxml

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 »


Professional Medicines, Online Pharmacy buy clomid buy viagra buy cialis buy tramadol buy soma buy levitra buy propecia buy ultram buy acomplia buy phentermine buy xenical buy kamagra Online Pharmacy Products
cialis consultation delivery discount health man cialis cialis forum cialis side eefects low cost generic generic cialis pills effectiveness viagra levitra cialis cheapest generic viagra and cialis pills cat 6 cialis bargain levitra levitra cialis dysfunction erectile levitra viagra 2003 cyalis levitra market sales viagra clarinex stimula levitra aldara pay pal order diflucan viagra, cialis, levitra, diflucan, clomid buy generic soma dream levitra online order pharmaceutical zithromax price soma prescriber information soma aura soma color therapy essences soma carisoprodol 350mg soma restaurant scottsdale buy pfizer viagra viagra buying online story viagra viagra before and after viagra substituts modo de empleo viagra viagra suppositories side effects viagra testemonials viagra videos