# Request format from jabber simple to openfire server

**URL:** <https://www.ruby-forum.com/t/request-format-from-jabber-simple-to-openfire-server/186146>\
**Category:** Rails\
**Created:** [April 1, 2010, 7:41am UTC](https://www.ruby-forum.com/t/request-format-from-jabber-simple-to-openfire-server/186146 "2010-04-01T07:41:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikragu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e57/32.png) [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Post date:** [April 1, 2010, 7:41am UTC](https://www.ruby-forum.com/t/request-format-from-jabber-simple-to-openfire-server/186146/1 "2010-04-01T07:41:24Z")

</div>

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)  
client.connect  
client.auth(“gmailpassword”)

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  
me.

Thanks,  
Karthik
