[JDEV] Registering users by Java
Javier Rodriguez
javier.rodriguez at dgps.mcu.es
Thu Aug 1 02:47:48 CDT 2002
Try this:
String serverName;
String userName;
String password;
InfoQueryBuilder iqb;
IQRegisterBuilder iqRegb;
iqb = new InfoQueryBuilder();
iqRegb = new IQRegisterBuilder();
iqb.reset();
iqRegb.reset();
iqb.setType("set");
iqb.setToAddress(new JID(serverName));
iqRegb.set("username", userName);
iqRegb.set("password", password);
iqb.addExtension(iqRegb.build());
ConnectionBean cb = new ConnectionBean();
cb.connect(InetAddress.getByName(serverName));
cb.send((InfoQuery)iqb.build());
-----Mensaje original-----
De: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org]En nombre de
Dominic.Ellis at ecsoft.co.uk
Enviado el: jueves, 01 de agosto de 2002 9:12
Para: jdev at jabber.org
Asunto: [JDEV] Registering users by Java
Has anyone successfully registered users programmatically with the
JabberBeans package. I have 100+ users to setup, and want to do it that
way. I cannot see how to use the IQRegisterBuilder. Any sample code would
be great.
D
The information in this e-mail and any attached files is confidential. It
is intended solely for the use of the addressee. Any unauthorised
disclosure or use is prohibited. If you are not the intended recipient of
the message, please notify the sender immediately and do not disclose the
contents to any other person, use it for any purpose, or store or copy the
information in any medium. The views of the author may not necessarily
reflect those of the Company.
_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list