Subject: Stream XML TO connect Gtalk Server
Hello
I am a labview developer, and there is no XMPP library for labview, then i need to build my on library.
i started to read the book "XMPP: The Definitive Guide" but i still stuck in the Handshake part.
This what i did
i connect with TCP to gtalk server, and send this XML
And the Server send me back the connections options:
In the start i tried to connect the server with TLS then i send:
And the server send me back that:
But after i get this msg the server kick me off.
Then i tried to connect the server with SASL I send:
And the server send me back:
I think that i didn't understand how the encoding work, in the book it said
thanks for your help, and sorry for my english
I am a labview developer, and there is no XMPP library for labview, then i need to build my on library.
i started to read the book "XMPP: The Definitive Guide" but i still stuck in the Handshake part.
This what i did
i connect with TCP to gtalk server, and send this XML
- <?xml version="1.0"?>
- <stream:stream to="gmail.com"
- version="1.0"
- xmlns="jabber:client"
- xmlns:stream="http://etherx.jabber.org/streams">
And the Server send me back the connections options:
- <stream:stream from="gmail.com"
- id="5649958EB8EE38BA"
- version="1.0"
- xmlns:stream="http://etherx.jabber.org/streams"
- xmlns="jabber:client">
- <stream:features>
- <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/>
- </starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
- <mechanism>X-GOOGLE-TOKEN</mechanism>
- <mechanism>X-OAUTH2</mechanism>
- </mechanisms>
- </stream:features>
In the start i tried to connect the server with TLS then i send:
- <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
- <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
Then i tried to connect the server with SASL I send:
- <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="X-GOOGLE-TOKEN">Base64{User And Password}</auth>
- <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><incorrect-encoding/></failure></stream:stream>
I think that i didn't understand how the encoding work, in the book it said
what i need to write instead of the <0>. in the internet it say NULL. How to send null in text?(The Base64-decoded string is <0>alice<0>password—clearly Alice needs some instruc-tion on best practices for information security.)
thanks for your help, and sorry for my english