Simple chat application

View: New views
9 Messages — Rating Filter:   Alert me  

Simple chat application

by Niels Bosma :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

I'm trying to create a very simple chat application in Flex/.Net (based on the examples) using FlurineFX but can't get it to work. I don't require any login for what I want to achieve, so I haven't implemented anything on the server side. I feel that I'm missing something on the server side config???

I'm using Flex 3.

    <mx:VBox
        width="100%"
        height="100%"
        xmlns:mx="http://www.adobe.com/2006/mxml">
   
    <mx:Style source="../../../Monkeywrench.css"/>
   
    <mx:Script>
    <![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="";
    }
   
    ]]>
    </mx:Script>
   
    <mx:Consumer id="consumer" destination="chat" message="messageHandler(event)" fault="messagefaultHandler(event)"/>
    <mx:Producer id="producer" destination="chat" fault="messagefaultHandler(event)"/>
   
    <mx:TextArea height="100%" width="100%" editable="false" id="txtLog"/>
   
    <mx:HBox width="100%">
   
        <mx:TextInput width="100%" id="txtOutput"/>
        <mx:Button label="Skicka" click="sendMessage()"/>
   
    </mx:HBox>
   
    </mx:VBox>

My services-config.xml:

    <?xml version="1.0" encoding="utf-8" ?>
    <services-config>
        <services>
   
            <service id="message-service" class="flex.messaging.services.MessageService" messageTypes="flex.messaging.messages.AsyncMessage">
                <adapters>
                    <adapter-definition id="messagingAdapter" class="FluorineFx.Messaging.Services.Messaging.MessagingAdapter" default="true"/>
                </adapters>
                <destination id="chat">
                    <adapter ref="messagingAdapter"/>
                    <channels>
                        <channel ref="my-rtmp"/>
                    </channels>
                    <properties>
                        <network>
                            <session-timeout>20</session-timeout>
                        </network>
                        <server>
                            <allow-subtopics>true</allow-subtopics>
                        </server>
                    </properties>
                    <!--
                    <security>
                        <security-constraint ref="privileged-users"/>
                    </security>
                    -->
                </destination>
            </service>
   
        </services>
   
        <channels>
   
            <channel-definition id="my-rtmp" class="mx.messaging.channels.AMFChannel">
                <endpoint uri="rtmp://{server.name}:1950" class="flex.messaging.endpoints.RTMPEndpoint"/>
            </channel-definition>
           
        </channels>
    </services-config>

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 errors in the flourine.log.

Thanks

--
Niels Bosma
Teknikansvarig
niels@...
+46767742725
Offerta.se


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Simple chat application

by kiko-5 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

I haven't seen a post in the group in a long-time...  And it looks like you are not getting any response...  You should check out and google Weborb.

Cheers.


-
kiko

-----Original Message-----
From: Niels Bosma <niels.bosma@...>

Date: Fri, 26 Jun 2009 14:47:41
To: Fluorine Mailing List<fluorine@...>
Subject: [Fluorine] Simple chat application


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com



_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Simple chat application

by Support-179 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi Niels,
 
(channel-definition) "mx.messaging.channels.AMFChannel" is for http AMF channel support, but "flex.messaging.endpoints.RTMPEndpoint" is instructing the backend to work with RTMP connections.
I am not sure which one do you want to use but mixing those 2 is a problem.
 
Zoli


From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Niels Bosma
Sent: Friday, June 26, 2009 3:48 PM
To: Fluorine Mailing List
Subject: [Fluorine] Simple chat application

I'm trying to create a very simple chat application in Flex/.Net (based on the examples) using FlurineFX but can't get it to work. I don't require any login for what I want to achieve, so I haven't implemented anything on the server side. I feel that I'm missing something on the server side config???

I'm using Flex 3.

    <mx:VBox
        width="100%"
        height="100%"
        xmlns:mx="http://www.adobe.com/2006/mxml">
   
    <mx:Style source="../../../Monkeywrench.css"/>
   
    <mx:Script>
    <![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="";
    }
   
    ]]>
    </mx:Script>
   
    <mx:Consumer id="consumer" destination="chat" message="messageHandler(event)" fault="messagefaultHandler(event)"/>
    <mx:Producer id="producer" destination="chat" fault="messagefaultHandler(event)"/>
   
    <mx:TextArea height="100%" width="100%" editable="false" id="txtLog"/>
   
    <mx:HBox width="100%">
   
        <mx:TextInput width="100%" id="txtOutput"/>
        <mx:Button label="Skicka" click="sendMessage()"/>
   
    </mx:HBox>
   
    </mx:VBox>

My services-config.xml:

    <?xml version="1.0" encoding="utf-8" ?>
    <services-config>
        <services>
   
            <service id="message-service" class="flex.messaging.services.MessageService" messageTypes="flex.messaging.messages.AsyncMessage">
                <adapters>
                    <adapter-definition id="messagingAdapter" class="FluorineFx.Messaging.Services.Messaging.MessagingAdapter" default="true"/>
                </adapters>
                <destination id="chat">
                    <adapter ref="messagingAdapter"/>
                    <channels>
                        <channel ref="my-rtmp"/>
                    </channels>
                    <properties>
                        <network>
                            <session-timeout>20</session-timeout>
                        </network>
                        <server>
                            <allow-subtopics>true</allow-subtopics>
                        </server>
                    </properties>
                    <!--
                    <security>
                        <security-constraint ref="privileged-users"/>
                    </security>
                    -->
                </destination>
            </service>
   
        </services>
   
        <channels>
   
            <channel-definition id="my-rtmp" class="mx.messaging.channels.AMFChannel">
                <endpoint uri="rtmp://{server.name}:1950" class="flex.messaging.endpoints.RTMPEndpoint"/>
            </channel-definition>
           
        </channels>
    </services-config>

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 errors in the flourine.log.

Thanks

--
Niels Bosma
Teknikansvarig
niels@...
+46767742725
Offerta.se


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Simple chat application

by Support-179 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi kiko (or whatever your name is),

This is an open source software mailing list where anyone (including *you*)
can try to help others through contribution of their best knowledge.
If this was your best, you are free to do exactly that and please do not
pollute the mailing list thread.

Thanks,
Zoli


-----Original Message-----
From: fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of kiko
Sent: Sunday, June 28, 2009 6:36 PM
To: Fluorine Mailing List
Subject: Re: [Fluorine] Simple chat application

I haven't seen a post in the group in a long-time...  And it looks like you
are not getting any response...  You should check out and google Weborb.

Cheers.


-
kiko

-----Original Message-----
From: Niels Bosma <niels.bosma@...>

Date: Fri, 26 Jun 2009 14:47:41
To: Fluorine Mailing List<fluorine@...>
Subject: [Fluorine] Simple chat application


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesil
entgroup.com



_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesil
entgroup.com


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Parent Message unknown Re: Simple chat application

by kiko-5 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi Zoli,

I never had any bad intentions or had planned to take anything away from this mailing list or the open source community.  Thanks for your response and sorry if I had communicated inappropriately.  If you own this list, please remove me - I don't want to be part of any of it.

Have a nice day and good luck to you.

Kiko  
------Original Message------
From: Support
To: kiko@...
To: 'Fluorine Mailing List'
Subject: RE: [Fluorine] Simple chat application
Sent: Jun 28, 2009 12:37 PM

Hi kiko (or whatever your name is),

This is an open source software mailing list where anyone (including *you*)
can try to help others through contribution of their best knowledge.
If this was your best, you are free to do exactly that and please do not
pollute the mailing list thread.

Thanks,
Zoli


-----Original Message-----
From: fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of kiko
Sent: Sunday, June 28, 2009 6:36 PM
To: Fluorine Mailing List
Subject: Re: [Fluorine] Simple chat application

I haven't seen a post in the group in a long-time...  And it looks like you
are not getting any response...  You should check out and google Weborb.

Cheers.


-
kiko

-----Original Message-----
From: Niels Bosma <niels.bosma@...>

Date: Fri, 26 Jun 2009 14:47:41
To: Fluorine Mailing List<fluorine@...>
Subject: [Fluorine] Simple chat application


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesil
entgroup.com



_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesil
entgroup.com



-
kiko
_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Simple chat application

by Eduardo Kraus :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message



This is because we are not having problems with the fuorine

Cheers.

Eduardo Kraus
Desenvolvedor
eduardokraus@...
http://blog.mxml.com.br
http://twitter.com/EduardoKraus


2009/6/28 kiko <kiko@...>
I haven't seen a post in the group in a long-time...  And it looks like you are not getting any response...  You should check out and google Weborb.

Cheers.


-
kiko

-----Original Message-----
From: Niels Bosma <niels.bosma@...>

Date: Fri, 26 Jun 2009 14:47:41
To: Fluorine Mailing List<fluorine@...>
Subject: [Fluorine] Simple chat application


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com



_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Runtime debug problem

by robiwan :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Have a problem when trying to run the ByteArray example with my own built FluorineFX:

"Could not load file or assembly 'FluorineFx, Version=1.0.0.17, Culture=neutral, PublicKeyToken=c7c93f18fa4fb5f4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

I'm not very C#-savvy so I have no idea what to do here...

TIA
/Rob


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Runtime debug problem

by Support-179 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi Rob,

It means that there is an assembly including a different version of
FluorineFx (an older one) and assembly binding fails.
For example it can be the case when you have the service browser referenced
by your application and the service browser assembly was not rebuilt with
your custom built FluorineFx
Or your service library and web application are referencing different
versions of FluorineFx.
Where do you get in this error? If it is traced in the fluorine.log file can
you find any additional details there about the binding error?
 
Zoli

-----Original Message-----
From: fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Robert
Bielik
Sent: Thursday, July 02, 2009 3:46 PM
To: Fluorine Mailing List
Subject: [Fluorine] Runtime debug problem

Have a problem when trying to run the ByteArray example with my own built
FluorineFX:

"Could not load file or assembly 'FluorineFx, Version=1.0.0.17,
Culture=neutral, PublicKeyToken=c7c93f18fa4fb5f4' or one of its
dependencies. The located assembly's manifest definition does not match the
assembly reference. (Exception from HRESULT: 0x80131040)"

I'm not very C#-savvy so I have no idea what to do here...

TIA
/Rob


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesil
entgroup.com


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Runtime debug problem

by robiwan :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Support skrev:

> Hi Rob,
>
> It means that there is an assembly including a different version of
> FluorineFx (an older one) and assembly binding fails.
> For example it can be the case when you have the service browser referenced
> by your application and the service browser assembly was not rebuilt with
> your custom built FluorineFx
> Or your service library and web application are referencing different
> versions of FluorineFx.
> Where do you get in this error? If it is traced in the fluorine.log file can
> you find any additional details there about the binding error?

Kösz Zoli,

Problem was that the asp.net web project bound to a 1.0.0.15 version of the dll, when I removed that dll
it works fine!

Regards,
/Rob

_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com