Dear All
I have installed OPenfire on my local machine along with gateway plugins, i need to use yahoo, aim msn gateway from my application. Following link shows the main steps invloved in using gateway i.e. discovering the gateway using Service discovery, registeration and including the transport in the roster.
[http://www.igniterealtime.org/forum/thread.jspa?messageID=107687𚒧]
This link also provides two other links which explain gateway discovery using service discovery nad regiseration but both links are not available.
Can anyone please help me in finding how this can be done?.
So far i tried the code provided in smack documentation which uses DiscoverInf, the code is shown below
ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(xmppConnection);
DiscoverInfo discoInfo = new DiscoverInfo();
try
{
discoInfo = discoManager.discoverInfo(“msn.tcmjabberserver.com”);
} catch (XMPPException ex) {
ex.printStackTrace();
} // Get the discovered identities of the remote XMPP entity
Iterator it = discoInfo.getIdentities();
// Display the identities of the remote XMPP entity
while (it.hasNext())
{
DiscoverInfo.Identity identity = (DiscoverInfo.Identity) it.next();
System.out.println(identity.getName());
System.out.println(identity.getType());
System.out.println(identity.getCategory());
}
But when i run this code it gives me the following exception
bad-request(400)
at org.jivesoftware.smackx.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryMa nager.java:413)
at org.jivesoftware.smackx.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryMa nager.java:379)
at com.tcm.im.JabberConnection.main(JabberConnection.java:82)
In debugger window, i noticed that the following XML request was sent to jabber server which matches with XEP100’'s description. but the replies back in an error. <iq id=“DlHym-0” to=“msn.tcmjabberserver.com” type=“get”>
<query xmlns=“http://jabber.org/protocol/disco#info”/>
</iq>
Error returned from the server
<iq id=“DlHym-0” to=“tcmjabberserver.com/beebf601” from=“msn.tcmjabberserver.com” type=“error”>
<query xmlns=“http://jabber.org/protocol/disco#info”/>
<error code=“400” type=“MODIFY”>
<bad-request xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas”/>
</error>
</iq>
Please help me with this and also guide me on the rest of the steps. Thanks alot in advance