Hi, can anyone help?
I'm struggling with the auction example (Part III).
Partly this is because the latest version of Openfire is 4.0.3 and I presume you also have to have pretty much the latest version therefore of smack (I've downloaded 4.2)... though I'm not clear about the correspondence between Openfire and smack versions.
It's not just that though: several of the lines in the "Building the test rig" section lead to a compile failure:
Main.main(XMPP_HOSTNAME, SNIPER_ID, SNIPER_PASSWORD, auction.getItemId());
... for this I just created a "stub" Main class
connection.getChatManager().addChatListener(
new ChatManagerListener() {
public void chatCreated(Chat chat, boolean createdLocally) {
currentChat = chat;
}
});
... of course, it is possible that a method "getChatManager" exists with an older version of the class XMPPConnection (now become an interface!)
It appears that you have now to make a new class:
public class AuctionConnection extends XMPPTCPConnection {
public AuctionConnection(CharSequence jid, String password) throws XmppStringprepException {
super(jid, password);
... and then create it by going
connection = new AuctionConnection( "admin", "admin" );
... but it's not working (yet) ... :-)
Anyone managed to succeed?
NB please don't tell me to use "any messaging framework"... I haven't really got a clue about any of this stuff, I just want to follow the TDD process.