Request format from jabber simple to openfire server

Hi All,

In order to enable chat functionality with gmail in my rails
application i used “Jabber” and “xmpp4r/simple” and finished the chat
functionality well and fine. Now i was asked to enable the chat
functionality with other services like “MSN”,“Yahoo”,“AOL” etc which
requires a third party server to act as mediator between the
service(like msn or yahoo etc) and my rails application.

For that purpose i installed openfire server successfully. Now All i
want to know is how to send request to openfire server from my rails
application using “jabber” as how i did for gmail. Below is the piece of
code i used to connect with gamil from “jabber”.

require ‘xmpp4r’
require ‘xmpp4r/bytestreams’
require ‘xmpp4r/roster/helper/roster’
require ‘xmpp4r/roster/iq/roster’
require ‘xmpp4r/vcard’
require ‘xmpp4r-simple’

include Jabber
Jabber::debug = true

jid = Jabber::JID::new(“mygmailid”)
client = Jabber::Client::new(jid)

Now i want to know how to use the above piece of code to send request
to openfire server. by default the request sent using above code goes to
port “5222” which belongs to google talk. I dont know how to specify the
port number or frame the request that can be send to openfire server. I
was in hurry to figure this out. Anyone knows the solution please help