Smack Wildfire connection problems

Hi,

I am attempting to write a small proof of concept which will test if a java class can create a connection to a wildfire server. I am using Smack 2.2.1 and Wildfire 3.0.1. I am compiling and running the two java classes below from the command line.

IMChat.java:

package testchat;

import org.jivesoftware.smack.*;

public class IMChat{

public IMChat(){

try{

XMPPConnection.DEBUG_ENABLED = true;

XMPPConnection conn = new XMPPConnection(“dev1”,5269);

conn.login(“tester”,“notmyrealpassword”);

           Chat chat = conn.createChat("admin@example.com");

chat.sendMessage(“Hey, how’'s it going?”);

}catch(XMPPException ex){System.out.println(ex.getMessage());}

}

}

Test.java:

import testchat.*;

public class Test{

public Test(){

IMChat imchat = new IMChat();

}

public static void main(String[] args){

Test test = new Test();

}

}

The command prompt displays:

stream:error (host-unknown)

and the log in wildfire displays:

2006.08.16 17:28:02 [org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java :104)

] Connection closed before session established

Socket[addr=/10.32.112.176,port=4285,localport=5269]

It seems like some sort of a connection is being made since wildfire is logging the connection attempt. This is all being run on the same machine. Any suggestions on what I might be doing wrong?

Thanks,

Ty

You’'re trying to connect as a client to the server-to-server port (5269). Try using the client port, 5222.

Thanks that worked.