powered by Jive Software

Big problem to connect user to OpenFire (using Strophe)

Hi!

I have tried to make this work for months(webchat), so now I need some help.

The user can log in, so far it works, but when the user update the page, and my code is attaching the user, then i get from OpenFire: ‘404 Invalid SID.’

Connectionlog between OpenFire and the client:

Login:
POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 207
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826005' xmlns='http://jabber.org/protocol/httpbind' to='127.0.0.1' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 643
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 160
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826006' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'><auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/></body>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 269
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 471
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826007' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'><response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9Ik1yY29kZSIscmVhbG09IjEyNy4wLjAuMSIsbm9uY2U9IkFEQUV2MkJyM2JNb0RJZmRPWUhNemlQUS9zelFIQzNsWjR4TENYR3YiLGNub25jZT0iZDQxZDhjZDk4ZjAwYjIwNGU5ODAwOTk4ZWNmODQyN2UiLG5jPSIwMDAwMDAwMSIscW9wPSJhdXRoIixkaWdlc3QtdXJpPSJ4bXBwLzEyNy4wLjAuMSIscmVzcG9uc2U9IjBiYjQ5Mzc0MTEzZmY2NzlkMzNlNDg5YzVjYzdjYTYwIixjaGFyc2V0PSJ1dGYtOCI=</response></body>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 173
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 160
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826008' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b' to='127.0.0.1' xml:lang='en' xmpp:restart='true' xmlns:xmpp='urn:xmpp:xbosh'/>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 334
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 197
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826009' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'><iq type='set' id='_bind_auth_2' xmlns='jabber:client'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/></iq></body>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 212
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 206
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826010' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'><iq type='set' id='_session_auth_2' xmlns='jabber:client'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq></body>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 186
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 220
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826011' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'><iq to='Mrcode@127.0.0.1' type='get' id='disco-1' xmlns='jabber:client'><query xmlns='http://jabber.org/protocol/disco#info'/></iq></body>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 351
Server: Jetty(6.1.x) Attach: (after refresh the page about 10 seconds later) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 220
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826012' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'><iq to='Mrcode@127.0.0.1' type='get' id='disco-1' xmlns='jabber:client'><query xmlns='http://jabber.org/protocol/disco#info'/></iq></body>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 57
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 83
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826013' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'/>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 351
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 83
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826014' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b'/>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 103
Server: Jetty(6.1.x) POST /http-bind/ HTTP/1.1
Accept: */*
Accept-Language: sv-SE
Referer: http://localhost/Chat/flXHR.swf
x-flash-version: 10,0,22,87
Content-Type: application/x-www-form-urlencoded
Content-Length: 158
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Alexa Toolbar)
Host: 127.0.0.1:7070
Connection: Keep-Alive
Cache-Control: no-cache
<body rid='3623826015' xmlns='http://jabber.org/protocol/httpbind' sid='7cde4b7b' type='terminate'><presence xmlns='jabber:client' type='unavailable'/></body>
HTTP/1.1 404 Invalid SID.
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1402
Server: Jetty(6.1.x)

The code I have right now are:

http://www.aspsidan.se/code/default.asp?c=24977

What could be wrong?

The server response when login:

<body authid="14297907" sid="14297907" secure="true" requests="2" inactivity="3000" polling="5" wait="60" hold="1" ack="3283801128" maxpause="300" ver="1.6"> <stream:features> <mechanisms> <mechanism>DIGEST-MD5</mechanism> <mechanism>PLAIN</mechanism> <mechanism>CRAM-MD5</mechanism> </mechanisms> <compression> <method>zlib</method> </compression> <bind/> <session/> </stream:features> </body> <body> <success> cnNwYXV0aD1iZDNiNzM4N2Y1YmFkYjgyYzlhYjk4NDNlNWUyY2ViZQ== </success> </body> <body> <success> cnNwYXV0aD1iZDNiNzM4N2Y1YmFkYjgyYzlhYjk4NDNlNWUyY2ViZQ== </success> </body> <body> <stream:features> <compression> <method>zlib</method> </compression> <bind/> <session/> </stream:features> </body> <body> <iq type="result" id="_bind_auth_2" to="127.0.0.1/14297907"> <bind> <jid>mrc...@127.0.0.1/14297907</jid> </bind> </iq> </body> <body> <iq type="result" id="_session_auth_2" to="mrc...@127.0.0.1/14297907"> <session/> </iq> </body> <body> <iq type="result" id="disco-1" from="mrc...@127.0.0.1" to="mrc...@127.0.0.1/14297907"> <query> <identity category="account" type="registered"/> <identity category="pubsub" type="pep"/> <feature var="http://jabber.org/protocol/disco#info"/> </query> </iq> </body> And when i try attach: POST: <body rid="229844771" sid="cfea08bd"> <iq to="Mrc...@127.0.0.1" type="get" id="disco-1"> <query/> </iq> </body>
RESPONSE: <body/>
-----
POST: <body rid="229844772"  sid="cfea08bd"/>
RESPONSE: <body> <iq type="result" id="disco-1" from="mrc...@127.0.0.1" to="mrc...@127.0.0.1/cfea08bd"> <query> <identity category="account" type="registered"/> <identity category="pubsub" type="pep"/> <feature var="http://jabber.org/protocol/disco#info"/> </query> </iq> </body>
----
POST: <body rid="229844773"  sid="cfea08bd"/>
RESPONSE: <body type="terminate"  condition="policy-violation"/>

**Is there anything there that could be wrong? Why ‘terminate’?
**

Anyone know answer/help us??? I have the same problem with Openfire + JsJaC…

Anyone?

"The user can log in, so far it works, but when the user update the page, and my code is attaching the user, then i get from OpenFire: ‘404 Invalid SID.’ " ------------ I don’t understand the question??

i just using strophe test openfire on localhost, work fine for me. but i want to list all contacts using xml command,? help me.