Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Flex Messaging   Message List  
Reply | Forward Message #118388 of 149659 |
Re: [flexcoders] Flex Messaging


Might as well include this
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
     creationComplete="initApp()">
    <mx:Script>
        <![CDATA[
         
            private function initApp():void
            {
                myConsumer.subscribe();
                onTimerComplete();
               
            }
            private function onTimerComplete():void
            {
                var asyncMessage:AsyncMessage = new AsyncMessage();
                asyncMessage.headers.gatewayid="BlogStats";
                asyncMessage.body={user:"b"};
                myProducer.send(asyncMessage);
           
            }
            private function onMessageRecieved(event:MessageEvent):void
            {
                trace(event);
            }
           
        ]]>
    </mx:Script>
   
    <mx:Consumer id="myConsumer" destination="ColdFusionGateway"
         message="onMessageRecieved(event)" fault="mx.controls.Alert.show(event.faultString)" />
    <mx:Producer id="myProducer" destination="ColdFusionGateway" fault="mx.controls.Alert.show(event.faultString)"/>
   
</mx:Application>

----- Original Message ----
From: Sherif Abdou <sherif626@...>
To: flexcoders@yahoogroups.com
Sent: Sunday, July 6, 2008 1:55:42 PM
Subject: [flexcoders] Flex Messaging


All right so what I am doing wrong here, I am using the DataMessaging service in Coldfusion and everything works. However, I can not seem to return anything from the CFC other than the event itself. So for the first one am i not allowed to do that? All I want to do is send different information back than what flex is sending me.

This does not work
<cfcomponent output="false">
        <cffunction name="onIncomingMes sage" access="remote" returntype=" struct">
        <cfargument name="event" required="true" type="struct">
        <cfset myStruct=StructNew( )>
        <cfset myStruct.test= "Hello">
        <cfreturn myStruct>
    </cffunction>
</cfcomponent>
This works.
<cfcomponent output="false">
        <cffunction name="onIncomingMes sage" access="remote" returntype=" struct">
        <cfargument name="event" required="true" type="struct">
          <cfset myStruct = event.data>
           <cfreturn myStruct>
    </cffunction>
</cfcomponent>




Sun Jul 6, 2008 7:22 pm

sherif626
Offline Offline
Send Email Send Email

Forward
Message #118388 of 149659 |
Expand Messages Author Sort by Date

Hi, As per Flex 2.0 documentation, messaging is limited to "Topics" - i.e. Producer - subscriber type of messaging. Is Point to Point messaging (Queue) not...
Venu Vasireddy
vvasireddy@...
Send Email
Mar 22, 2006
1:24 pm

Not at the moment, we're investigating ways to simulate but I don't think we'll have true point-to-point in Flex 2. ________________________________ From:...
Matt Chotin
m_chotin
Online Now Send Email
Mar 28, 2006
6:48 am

All right so what I am doing wrong here, I am using the DataMessaging service in Coldfusion and everything works. However, I can not seem to return anything...
Sherif Abdou
sherif626
Offline Send Email
Jul 6, 2008
6:55 pm

Might as well include this <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" ...
Sherif Abdou
sherif626
Offline Send Email
Jul 6, 2008
7:22 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help