Note that there are some explanatory texts on larger screens.

plurals
  1. POFlex/.NET: Simple chat application using FluorineFX
    text
    copied!<p>I'm trying to create a very simple chat application in Flex/.Net using FluorineFX but can't get it to work.</p> <pre><code>&lt;mx:VBox width="100%" height="100%" xmlns:mx="http://www.adobe.com/2006/mxml"&gt; &lt;mx:Style source="../../../Monkeywrench.css"/&gt; &lt;mx:Script&gt; &lt;![CDATA[ import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.messaging.*; import mx.messaging.messages.*; import mx.messaging.events.*; import mx.core.Application; private function messageHandler(event:MessageEvent):void { txtLog.text += event.message.body.userId + ": " + event.message.body.text + "\n"; } private function messagefaultHandler(event:MessageFaultEvent):void { Alert.show(event.faultString, "Error"); } public function sendMessage():void { var message:AsyncMessage = new AsyncMessage(); message.body = {userId: Application.application.auth.user.Email, text: txtOutput.text} producer.send(message); txtOutput.text=""; } ]]&gt; &lt;/mx:Script&gt; &lt;mx:Consumer id="consumer" destination="chat" message="messageHandler(event)" fault="messagefaultHandler(event)"/&gt; &lt;mx:Producer id="producer" destination="chat" fault="messagefaultHandler(event)"/&gt; &lt;mx:TextArea height="100%" width="100%" editable="false" id="txtLog"/&gt; &lt;mx:HBox width="100%"&gt; &lt;mx:TextInput width="100%" id="txtOutput"/&gt; &lt;mx:Button label="Skicka" click="sendMessage()"/&gt; &lt;/mx:HBox&gt; &lt;/mx:VBox&gt; </code></pre> <p>My services-config.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;services-config&gt; &lt;services&gt; &lt;service id="message-service" class="flex.messaging.services.MessageService" messageTypes="flex.messaging.messages.AsyncMessage"&gt; &lt;adapters&gt; &lt;adapter-definition id="messagingAdapter" class="FluorineFx.Messaging.Services.Messaging.MessagingAdapter" default="true"/&gt; &lt;/adapters&gt; &lt;destination id="chat"&gt; &lt;adapter ref="messagingAdapter"/&gt; &lt;channels&gt; &lt;channel ref="my-rtmp"/&gt; &lt;/channels&gt; &lt;properties&gt; &lt;network&gt; &lt;session-timeout&gt;20&lt;/session-timeout&gt; &lt;/network&gt; &lt;server&gt; &lt;allow-subtopics&gt;true&lt;/allow-subtopics&gt; &lt;/server&gt; &lt;/properties&gt; &lt;!-- &lt;security&gt; &lt;security-constraint ref="privileged-users"/&gt; &lt;/security&gt; --&gt; &lt;/destination&gt; &lt;/service&gt; &lt;/services&gt; &lt;channels&gt; &lt;channel-definition id="my-rtmp" class="mx.messaging.channels.AMFChannel"&gt; &lt;endpoint uri="rtmp://{server.name}:1950" class="flex.messaging.endpoints.RTMPEndpoint"/&gt; &lt;/channel-definition&gt; &lt;/channels&gt; &lt;/services-config&gt; </code></pre> <p>It's compiling all fine, and when I try to send I don't get any errors, but also no result. No message is received. Am I on the right path? What's the logic behind the endpoint uri? What port should I use? Should I configurate Web.config? (beyond the flourinefx configs that enable RemotingService?) I don't get any response in the flourine.log.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload