Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Professional XMPP Programming with JavaScript and jQuery
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 16th, 2010, 07:30 AM
Registered User
 
Join Date: Oct 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login program Clarification( Chap 3)

Dear all,

I am new to XMPP. This book is very useful to beginners like me.

I have little confusion to running the chapter 3 login sample program.

I have tried the following things,
1.Downloaded the chap3 codes(html,css,js)
2.I placed these three files in hello folder (D:/hello/hello.html,..)
3.Downloaded the flXHR-1.0 and uncompressed it.
4.Copied the content of deploy folder into scripts folder.

I have installed the ejabber server in my system, server name is "myserver"
I login in ejabber server like this, admin@myserver
(http://localhost:5280/admin/)

5. I changed this url ( in hello.js) http://bosh.metajack.im:5280/xmpp-httpbind into http://localhost:5280/xmpp-httpbind

6.When i open the hello.html file in IE and login with this username
Username:knandha@myserver
Password:******

but IE debug window show error like this,
Strophe.flxhr.js line number:18, column number:17
Object doesn't support this property or method

var xhr = new flensed.flXHR({
autoUpdatePlayer: true,
instancePooling: true,
noCacheHeader: false});

Note:
In hello.js file
The login states failed with this condition "connected", "disconnected"
The connecting states is true.


Please guide me for running this program
and Where to place the hello folder in my system, currently i am placing it in (D:/hello/hello.html,..)

Thanks
Nandha

Last edited by nandhagasc; October 16th, 2010 at 07:40 AM..
  #2 (permalink)  
Old October 19th, 2010, 05:32 AM
Registered User
 
Join Date: Oct 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 3 Login Program

Hello to EveryOne,

I am working with chapter3 Login program.
I registerd with this site http://register.jabber.org/
After I downloaded the code from http://github.com/metajack/profxmpp

Putting that folder into my wamp server directory.
I login with username(user@jabber.org) and password , In browser window it shows,
Connection established.
Sending ping to jabber.org.
Received pong from server in 1000ms.
Connection terminated.


After that I started my ejabber server.(server name is myserver)
And changing the url path in the hello.js file as
"http://myserver:5280/xmpp-httpbind" and "http://localhost:5280/xmpp-httpbind"

I login into my ejabber through the chapter3 program. but it doesn't connected.

Please guide me ..
Thanks
  #3 (permalink)  
Old October 19th, 2010, 03:38 PM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

What URL are you using to load your local web application (hello.html)? If you are loading it from file:///c/hello/hello.html then flxhr will not work. You must serve the application from a web server in order for the Flash security policy to allow you to make connections to a web server.

Alternatively, you could Firefox 3.5+ or Safari which have support for cross origin resource sharing, which should allow such a connection to ejabberd's connection manager as ejabberd gained support for this standard some months ago.
  #4 (permalink)  
Old October 20th, 2010, 01:03 AM
Registered User
 
Join Date: Oct 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login Program Clarification( Chap 3)

Hello Jack,

Thanks for reply.
I am using Firefox3.6.11 and IE8
I will explain clearly my scenario now.

I was registered in http://register.jabber.org/
I was downloded the code from http://github.com/metajack/profxmpp
The folder downloded with this name "metajack-profxmpp-917f92a"
I placed this folder at wamp server's root folder, such as www/metajack-profxmpp-917f92a
I was entered into "http://localhost/metajack-profxmpp-917f92a/",
Here the index page contains all the chapters name and link, I was select the Chapter 3.
The browser shows Login screen, i login with the registered username and password,It shows
"Connection established.Sending ping to jabber.org.Received pong from server in 1000ms.Connection terminated."

So, Next I was changed the URL in the hello.js file as "http://localhost:5280/xmpp-httpbind"
After i started my ejabbered Server, The server name is "myserver"

I was entering into "http://localhost/metajack-profxmpp-917f92a/ch03/hello.html", it shows login screen.
I put username and password of the ejabbered server's user.(username is knandha@myserver)

The result is
In Firefox 3.6, it shows "waiting for localhost" in the browser's status bar.
In IE8 ,
it shows error, that is "Error: 404, Not Found, An error occured preventing completion of the request."
The error in flensed.js file line no:12, col:1905

In Safari, it shows "http://localhost:5280/xmpp-httpbind not found"

Please guide me step by step,I am new to this environment.

Thanks
Nandha

Last edited by nandhagasc; October 20th, 2010 at 07:00 AM..
  #5 (permalink)  
Old October 20th, 2010, 11:26 AM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

If you are getting 404s from http://localhost:5280/xmpp-httpbind, ejabberd (or something else) is listening on port 5280 but it doesn't know the /xmpp-httpbind resource. I believe ejabberd uses /http-bind by default, so you might try: http://localhost:5280/http-bind instead.
  #6 (permalink)  
Old October 21st, 2010, 12:40 AM
Registered User
 
Join Date: Oct 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login program Clarification( Chap 3)

Thanks Jack for your suggestions.

I tried with that url as you mentioned.http://localhost:5280/http-bind
But the same error occurred.(Error: 404, Not Found, An error occured preventing completion of the request.)

All browsers shows the same error(Firefox,IE,Safari)

In Firefox-
16,ioError, An error occured preventing completion of the request.
http://localhost/metajack-profxmpp-9...pts/flensed.js

In IE-
Error:404, Not Found,An error occured preventing completion of the request.

In safari-
http://localhost:5280/httpbind not found

Thanks
Nandha.
  #7 (permalink)  
Old October 21st, 2010, 04:49 PM
Registered User
 
Join Date: Oct 2010
Location: http://sharefiles.co.tv/
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re:

Hmm, but i think youre wrong about
  #8 (permalink)  
Old October 21st, 2010, 05:31 PM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

It sounds like your XMPP server does not have the BOSH service running. You should be able visit http://server:port/service-url in a web browser and it will show you some standard message like:

"ejabberd mod_http_bind v1.2

An implementation of XMPP over BOSH (XEP-0206)

This web page is only informative. To use HTTP-Bind you need a Jabber/XMPP client that supports it."

If you can't get to that step, Strophe isn't going to be able to do anything.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 2 - Avatars and uploading files, (would apply to Chap 6 too) kenj BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 0 October 18th, 2009 03:14 PM
Chap 15: Cookies / "Remember Me" Login sw02 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 August 12th, 2009 11:18 AM
WebShop (Chap 9) Question about Login SDonnelly BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 October 19th, 2006 04:12 AM
Beginner Question: User Login and Out Program victor888 C# 2005 2 March 10th, 2006 08:21 AM
chap 2......login problem jccheah BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 8 June 17th, 2005 03:05 AM



All times are GMT -4. The time now is 10:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.