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