Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > BOOK: Professional XMPP Programming with JavaScript and jQuery
| 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 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
  #1 (permalink)  
Old January 27th, 2013, 01:42 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Register XMPP-Account using the Strophe.js-Register-Plugin

Hi,
I try to register a xmpp-account using the strophe-register-pluging (https://github.com/metajack/strophej...aster/register). It works fine with the connection manager from example "http://bosh.metajack.im:5280/xmpp-httpbind" but I cant register the account using the OpenFire connection manager. (Normal login works with both connection managers...)

Code:
Connection State Changes are 1 -> 10. 1 means "Connecting" but I dont know what 10 means...

var connection = new Strophe.Connection(
//          "http://bosh.metajack.im:5280/xmpp-httpbind");
        "http://localhost/http-bind");

var callback = function (status) {alert(status);
    if (status === Strophe.Status.REGISTER) {
        connection.register.fields.username = "fghdfhg";
        connection.register.fields.name = "dfgfdgfdg";
        connection.register.fields.password = "dfddfgfdg";
        connection.register.submit();
    } else if (status === Strophe.Status.REGISTERED) {
        console.log("registered!");
        connection.authenticate();
    } else if (status === Strophe.Status.CONNECTED) {
        $(document).trigger('connected');
    } else if (status === Strophe.Status.DISCONNECTED) {
        console.log("Disconnected from XMPP-Server");
    }
};

//    connection.connect(data.jid, data.password, callback);
connection.register.connect("xyz.com", callback, 60, 1);

Last edited by ede32; January 27th, 2013 at 01:45 PM..
  #2 (permalink)  
Old January 27th, 2013, 01:45 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

You'll have better luck filing a bug on GitHub or asking on the strophe mailing list. The developers of plugins probably aren't checking this site, and I didn't create that plugin, so I can't help much.
  #3 (permalink)  
Old January 27th, 2013, 01:49 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there an overview of all connection states? In strophe.js I just find state 0-8 and google doen't help me in this case :(

Thanks for the fast answer. I'll try it in github, too.
  #4 (permalink)  
Old January 27th, 2013, 01:55 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

The docs cover some of this:
http://strophe.im/strophejs/doc/1.0....atus_Constants

I'm not sure if that's helpful. If you're curious about a particular one, you can search core.js (if you're looking at the GitHub repo) or strophe.js (if not) and see where it is used.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Punjab fails on localhost (500 Internal Server Error), using Strophe.js HyprGeek BOOK: Professional XMPP Programming with JavaScript and jQuery 0 January 9th, 2013 01:55 AM
Issues with strophe register plugin Milo1999 BOOK: Professional XMPP Programming with JavaScript and jQuery 0 December 2nd, 2012 12:34 PM
INWARD REGISTER mail2dharam PHP How-To 0 June 10th, 2012 09:38 AM
Using sha1 passwords in Strophe.js semper BOOK: Professional XMPP Programming with JavaScript and jQuery 1 June 28th, 2010 02:15 PM





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