Round III, now with BOSH.
After attempt 1 and attempt 2 trying to connect XIFF to ejabberd without applying any patch to ejabberd I finally tried with BOSH connection and IT WORKED!!!
Below are the steps I followed to test a chat example.
export TEST_DIR=/tmp/xiffstep1 mkdir -p $TEST_DIR/xiff cd $TEST_DIR/xiff svn co http://svn.igniterealtime.org/svn/repos/xiff/trunk/src/org org
cd $TEST_DIR svn co http://svn.process-one.net/ejabberd/trunk/ ejabberd_src cd $TEST_DIR/ejabberd_src/src ./configure --prefix=$TEST_DIR/ejabberd make sudo su make install
cd $TEST_DIR/
svn co http://svn.process-one.net/ejabberd-modules ejabberd_modules_src
cd $TEST_DIR/ejabberd_modules_src/http_bind/trunk
./build.sh
sudo su
cp ebin/*.beam $TEST_DIR/ejabberd/lib/ejabberd/ebin/
# load mod_http_bind in ejabberd.cfg: {mod_http_bind,[]},
# add request_handler in ejabberd.cfg: {request_handlers, [{["http-bind"], mod_http_bind}]}
cd $TEST_DIR/ejabberd/etc/ejabberd
wget http://www.keoko.net/wp-content/uploads/2009/02/ejabberd.cfg
cd $TEST_DIR/ejabberd/sbin ./ejabberdctl start ./ejabberdctl register user1 localhost user1 ./ejabberdctl register user2 localhost user2
sudo apt-get install nginx
sudo vim /usr/local/nginx/conf/nginx.conf
# add the following lines after location / block
location /xmpp-httpbind {
proxy_pass http://localhost:5280/http-bind;
break;
}
sudo killall nginx
sudo /usr/local/nginx/sbin/nginx
cd $TEST_DIR/xiff wget http://www.keoko.net/wp-content/uploads/2009/02/xiffstep1bosh.mxml wget http://www.keoko.net/wp-content/uploads/2009/02/testchatbosh.as
# run eclipse File > New > Flex Project -> Project Name: XIFFstep1Bosh Delete > XIFFstep1BOSH.mxml File > Import > General > File System > Next > From directory: $TEST_DIR/xiff Run > Run
Mickaël Rémond was right: XMPP works with flash out of the box ... with BOSH connections, not with XML socket connections.