Hi,
Hopefully someone might recognise this error...
Sadly it brings up only one result on google and that's a bit
vague as to how that person got out of thier hole... :(
I'm trying some very simple Flex Messaging with Flex Builder
2.0.1 and CF8 Standard (with LiveCycle 2.5.? built in)
But I get this error:
"Destination 'ColdFusionGateway' requires FlexClient support
which was introduced in version 2.5. Please recompile the client
application with an updated client framework."
I guess the '2.5' is referring to LiveCycle?
And I guess it's saying that the Flex compiler needs some
updated elements to compile with so it can work with LiveCycle ?
I think stepping into Flex for the first time just as FDS
became LiveCycle was not a good idea.
Strangely I (may have) narrowed it down to the gatewayid tag
in messaging-config.xml
eg:
<gatewayid>*</gatewayid>
OR <gatewayid>Flex2CF2</gatewayid>
Which has been there well before LiveCycle. BUT If I remove
this tag completely the error doesn't occur... then of course
messaging doesn't work without it. Ho hum
I can't see any DataServicesMessaging In/Outs using
cf-polling-amf... I'm having more luck with cf-rtmp - I can see the
'In' and 'Out' counters ticking away when i view my ColdFusion
Event Gateway Instance in the CF admin.
So polling-amf won't connect, whereas rtmp will. Neither
channel will 'subscribe' though.
I've got ColdFusion Extensions 0.5.155475 installed (don't
ask me how - it was a nightmare!) and working in Flex Builder 2.
I tried bringing the flex/libs over to flex builder from CF
as they were newer - no good
I updated Flex Builder with:
Flex 2.0.1 SDK with HotFix 3 from
http://labs.adobe.com/technologies/flex/sdk/flex2sdk.htmlBut nothing helps.
here's the mxml:
---------------------------------------------------------------------------------
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"layout="absolute"
creationComplete="initApp()"
viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.mikenimer.components.*;
import mx.messaging.*;
import mx.messaging.messages.*;
import mx.messaging.events.*;
public var pro:mx.messaging.Producer;
public var con:mx.messaging.Consumer;
public function initApp():void {
pro = new mx.messaging.Producer();
pro.destination = "ColdFusionGateway";
consumer.subscribe();
}
public function sendMessage():void {
var msg:AsyncMessage = new AsyncMessage();
msg.headers.gatewayid = "Flex2CF2";
msg.body = new Object();
msg.body.emailto = emailto.text;
pro.send(msg);
messagestatus.text = "Message sent to ColdFusion.";
Debug.show(consumer);
Debug.show(pro);
}
private function messageHandler(event:MessageEvent):void {
messagestatus.text = "Message received from ColdFusion.";
}
private function faultHandler(event:MessageFaultEvent):void
{
messagestatus.text = "FAULT";
Debug.show(event);
}
/*
*/
]]>
</mx:Script>
<mx:Consumer id="consumer"
destination="ColdFusionGateway"
message="messageHandler(event)"
fault="faultHandler(event)" />
<mx:TextInput x="103" y="13" width="291" id="emailto"
editable="true"/>
<mx:Button x="402" y="13" label="Send" id="emailsend"
click="sendMessage();"/>
<mx:Label id="messagestatus" x="103" y="350" width="291"
text="Message
not sent yet."/>
</mx:Application>
---------------------------------------------------------------------------------
relevant bits from services-config.xml
---------------------------------------------------------------------------------
<channel-definition id="cf-polling-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint uri="
http://{server.name}:{server.port}{context.root}/flex2gateway/cfamfpolling"class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>1</polling-interval-seconds>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
<channel-definition id="cf-rtmp"
class="mx.messaging.channels.RTMPChannel">
<endpoint uri="rtmp://{server.name}:2048"
class="flex.messaging.endpoints.RTMPEndpoint"/>
<properties>
<idle-timeout-minutes>20</idle-timeout-minutes>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
---------------------------------------------------------------------------------
the messaging-config.xml
---------------------------------------------------------------------------------
<destination id="ColdFusionGateway">
<adapter ref="cfgateway" />
<properties>
<gatewayid>*</gatewayid>
</properties>
<channels>
<channel ref="cf-rtmp"/>
<channel ref="cf-polling-amf"/>
</channels>
</destination>
---------------------------------------------------------------------------------
I tried some of this to no avail:
<server>
<max-cache-size>1000</max-cache-size>
<message-time-to-live>0</message-time-to-live>
<durable>false</durable>
</server>
<network>
<subscriber-timeout>0</subscriber-timeout>
</network>
<network>
<session-timeout>0</session-timeout>
</network>
---------------------------------------------------------------------------------
why is it some lucky folk find it sooo easy? :
http://www.onflexwithcf.org/index.cfm/2007/8/2/Coldfusion-8-Simple-messaging-example-using-Messaging...it should be THAT easy dontcha think?
help me please, please.
Thanx
VV