Skip navigation
2446 Views 2 Replies Latest reply: Sep 24, 2010 2:10 AM by franto RSS
franto Bronze 15 posts since
Sep 23, 2010
Currently Being Moderated

Sep 23, 2010 2:43 AM

Logging private messages on server

Hi all,

 

First of all, I would like to say that XIFF 3.0 is great library and till now, I had no problem. I've done basic IM in Flex with chatting, MUC and private messages. Requirements from my client is store conversations on server which is supported by OpenFire, but problem is that I need store private messages sent in Group Chats. As far as I know, this is not supported by OpenFire, but I've found plugin OpenArchive, which do the job and store private messages on server (I can see them in Admin console). But now I really don't know how to retrieve them in Flex via XIFF library.

 

My first attempt was using SearchExtension, but I have problem to get anything. Maybe it's because I don't know how to use SearchExtension or maybe because of security reason.

 

Here is code I'm using for search:

private function search(userName: String): void
{
     SearchExtension.enable();
                    
     var iq:IQ = new IQ(room.roomJID.escaped, IQ.TYPE_GET, XMPPStanza.generateID('discoverSearch'), onServiceItems, onServiceItemsError);
     var search: SearchExtension = new SearchExtension();
     search.addTextNode(iq.getNode(), "query xmlns=\"jabber:iq:search\"", userName);
     iq.addExtension(search);

     connection.send(iq);                    
}
 

problem is that, when I call this search, there is security error #2048

 

Error: Error #2048: Security sandbox violation: file:///Users/xxxx/Documents/Flex Builder 3/XIFF_GUI/bin-debug/JabberSearch.swf cannot load data from imtest.xxxx.com:5222.

 

I'm also trying to load crossdomain.xml via

Security.loadPolicyFile("xmlsocket://" + connection.server + ":5229");

 

but it doesn't help. But I'm not sure, if everything else do not need crossdomain and works perfectly, if just search need it. Maybe it's just because I'm using SearchExtension in wrong way.

 

Can anybody give me any hints, how to retrieve stored private messages or how to use searchExtension, or how to correctly load crossdomain.xml to prevent security error.

 

I know I have many questions, but I've really stuck in this problem and need to find solution.

 

Thanks in advance for your answers

  • Mark Walters KeyContributor 146 posts since
    Feb 5, 2009
    Currently Being Moderated
    Sep 24, 2010 12:47 AM (in response to franto)
    Re: Logging private messages on server

    You'd probably want to look into XEP-0136.

    XIFF doesn't currently support this extension, but it could be done.

    The search extension (XEP-0055) is intended more for finding users.

    XEP-0136 is not currently on the XIFF road map, but I'll add it to the feature requests ( XIFF-76).

    Feel free to write and submit a patch for it.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points