Wrox Programmer Forums
|
BOOK: Professional XMPP Programming with JavaScript and jQuery
This is the forum to discuss the Wrox book Professional XMPP Programming with JavaScript and jQuery by Jack Moffitt; ISBN: 978-0-470-54071-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XMPP Programming with JavaScript and jQuery section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2012, 12:16 AM
Registered User
 
Join Date: Oct 2012
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Unhappy Not able to connect, status is always 1

Hi,

I've been searching for the answer and found quite some relative posts but still stuck. Since I couldn't connect to http://bosh.metajack.im:5280/xmpp-httpbind I setup a local ejabberd BOSH connection manager. I removed strophe.flXHR.js reference in peek.html, changed the connection to http://localhost:5280/http-bind in peek.js. The localhost BOSH link works in the browser.

But when running peek.html, the status is always 1. The URL I use is http://localhost/ch04/peek.html. The request and response are as follows:

Request URL:http://localhost:5280/http-bind
Request Method:POST
Status Code:200 OK

Request Headers
POST /http-bind HTTP/1.1
Host: localhost:5280
Connection: keep-alive
Content-Length: 207
Origin: http://localhost
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4
Content-Type: application/xml
Accept: */*
Referer: http://localhost/ch04/peek.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Request Payload
<body rid='1463697149' xmlns='http://jabber.org/protocol/httpbind' to='jabin.org' 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'/>

Response Headers
HTTP/1.1 200 OK
Content-Length: 131
Content-Type: text/xml; charset=utf-8
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type

Response
<body type='terminate' condition='internal-server-error' xmlns='http://jabber.org/protocol/httpbind'>BOSH module not started</body>

Could someone please give me some idea?
Thanks!
 
Old October 2nd, 2012, 08:01 PM
Registered User
 
Join Date: Oct 2012
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I tried using http://bosh.metajack.im:5280/xmpp-httpbind in a different network environment and it works. Seem like the port was blocked or something. I'm trying installing punjab in localhost.
 
Old October 2nd, 2012, 11:07 PM
Wrox Author
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

Quote:
<body type='terminate' condition='internal-server-error' xmlns='http://jabber.org/protocol/httpbind'>BOSH module not started</body>
Notice that it says you don't have the bosh module started. This is just an ejabberd configuration issue.

Do you have a similar log for bosh.metajack.im? I can help diagnose it if you can provide some more information.
The Following User Says Thank You to metajack For This Useful Post:
begeeben (October 3rd, 2012)
 
Old October 3rd, 2012, 01:58 AM
Registered User
 
Join Date: Oct 2012
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you!
Our work will be deployed in a different environment and might not need an jabber server locally so I'll just leave it for now. I'll use the BOSH manager from the book and maybe setup a local punjab later.
It's really good to get such a quick response, really appreciate that!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Publish Status iamsaltman BOOK: ASP.NET 4 Website Programming Problem Design Solution 1 October 29th, 2010 11:55 AM
WebPage status cdaye99 VBScript 2 August 7th, 2008 08:57 AM
Status Bar ironchef Java GUI 0 October 26th, 2006 09:19 PM
Status Box jbenson001 ASP.NET 1.x and 2.0 Application Design 7 May 10th, 2004 03:32 PM
Status Bar soccers_guy10 Pro VB.NET 2002/2003 3 August 12th, 2003 11:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.