How to send messages using openfire

i have installed and configured openfire with asterisk-im,everything looks fine.i have also installed smack API,but where to copy

these lines.

XMPPConnection conn = new XMPPConnection("myserver.foo.com", "user", "password"); PhoneClient client = new PhoneClient(conn);

can any one can guide me,