This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (5 pts)
1 Replies Last post: Aug 20, 2007 10:37 AM by Richard Bottoms  
rickprospers Bronze 19 posts since
Jan 21, 2006
Currently Being Moderated

Aug 20, 2007 1:31 AM

XIFF / AIR

 

Hi All,

 

 

I am really struggling with XIFF because I am not at all an ActionScript developer - I am more on the server-side development.  I believe that XIFF is what I need for my project but I am not sure because the project will be using Adobe AIR which does support XML sockets.  Through AIR, I cannot seem to find a way to login to the OpenFire server.

 

 

The application I am working on needs have:

 

  1. Alerts on the desktop via IM.

  2. Users message back and forth through the web browser / AIR.

 

I know that AIR has socket support but I am not sure if it is sufficient to receive incoming requests from the OpenFire server on its own.

 

 

I am willing to pay to have this implemented.  If you can assist or send me a quote, I would appreciate it.  If you want to send a quote, please send it to rmsubscribesATgmailDOTcom.  Any and all help is greatly appreciated.  I have tried many other resources.  I hope this one solves the problem.

 

 

 

 

Richard Bottoms Bronze 16 posts since
Aug 15, 2007
Currently Being Moderated
Aug 20, 2007 10:49 AM in response to: rickprospers
Re: XIFF / AIR

This worked for me in the Flex 3 Eclipse environment. Once the connection is established you stay connected until the object is released. I just added an incoming message event listener to my code and it works fine:

 

var connection = new XMPPConnection();

var psce_on:Presence = new Presence( null, null, Presence.AVAILABLE_TYPE, Presence.SHOW_NORMAL, null, 1 );

var user1_msg:Message = new Message("user1@192.168.1.5", null, "Calling User1", null, Message.CHAT_TYPE, null);

var user2_msg:Message = new Message("user2@192.168.1.5", null, "Calling User2", null, Message.CHAT_TYPE, null);

var incoming_msg:Message = new Message("user2@192.168.1.5", null, "Incoming Data", null, Message.CHAT_TYPE, null);

 

public function XMPPconn(): void {

 

connection.username = "testcase";

connection.password = "xxxx";

connection.server = "server.com";

connection.resource = "xiff";

connection.addEventListener(LoginEvent.LOGIN, handleLogin);

connection.connect( "flash" );

}

 

private function handleLogin(event:LoginEvent):void{

connection.send(psce_on);

connection.send(user1_msg);

connection.send(user2_msg);

trace("Messages sent.");

 

}

 

private function handleIncomingData(event:IncomingDataEvent):void{

connection.send(incoming_msg);        &n bsp;            &nbs p;                           &n bsp;           

trace("Incoming");

             &n bsp; 

}

More Like This

  • Retrieving data ...