Connecting to Google Talk

I was wondering if anyone has any experience with connecting to the Google Talk servers using Xiff alongside an encryption package like crypto. From looking at the incoming and outgoing messages it seems like Xiff doesn’t send the correct response. I’ve tried intercepting and sending my own response “” as found here http://www.adarshr.com/papers/xmpp but so far I’ve had no luck.

Output looks like this:

Trace
Deleted - Newer code below

Any help will greatly appreciated!

On having a deeper look at things I found a patch on this forum for TLS in XIFF and now the output looks like this:

Trace
Outgoing

<?xml version="1.0"?>

Incoming

<?xml version="1.0" encoding="UTF-8"?>

Outgoing

Incoming

stream:featuresX-GOOGLE-TOKEN</stream:features>

Outgoing

Incoming

stream:error<str:text xmlns:str=“urn:ietf:params:xml:ns:xmpp-streams”>Set the ‘to’ attribute of stream element to the domain part of the user’s JID. Example: to=‘gmail.com’.</str:text></stream:error>

CONNECTION ERROR

Code: 502

Message: Remote Server Error

Incoming

</stream:stream>

``

``

``

``

Deleted

Hey… to anyone wanting to connect to Google Talk, I’ve created a class which extends XMPPSocketConnection, so not altering the original code.

Download the file and use it like this:

connection = new GoogleTalkConnection();

connection.username = USER;

connection.password = PASS;

connection.server = “talk.google.com”;

connection.chatServer = “googlemail.com”;

connection.tls = true;

connection.port = 5222;

It is a trimmed version, of the application I’m building so there may be some un-necessary imports or little issues, but simple enough to fix.

Enjoy.
GoogleTalkConnection.zip (1198 Bytes)

I used the gtalkconnection still can’t login, always auth error

outcoming:

incoming: <iq type="error" id="log_user2_3"><query xmlns="jabber:iq:auth"><password/><username>genedna</username><resource>xiff</resource></query><error type="auth" code="403"><forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Username or password not correct.</text></error></iq>