How do I register a user using smack api ? I viewed the Registration class and could write nothing except the following :
Registration r = new Registration();
/*
* name -- the user's name.
first -- the user's first name.
last -- the user's last name.
email -- the user's email address.
city -- the user's city.
state -- the user's state.
zip -- the user's ZIP code.
phone -- the user's phone number.
url -- the user's website.
date -- the date the registration took place.
misc -- other miscellaneous information to associate with the account.
text -- textual information to associate with the account.
remove -- empty flag to remove account.
*/
Map<String,String> regAttr = new HashMap<String, String>();
regAttr.put("username", "suhail");
regAttr.put("first", "suhail");
regAttr.put("last", "gupta");
regAttr.put("email", "suhailgupta03@gmail.com");
regAttr.put("city", "ptk");
regAttr.put("state", "Punjab");
regAttr.put("zip", "145001");
regAttr.put("phone","9999");
regAttr.put("url", "www.abc.com");
regAttr.put("date", "14/8/2013");
regAttr.put("misc", "misc");
regAttr.put("text", "text");
regAttr.put("remove", "r");
r.setAttributes(regAttr);
How do I put this into the database ? I am using mysql as the database with the openfire server . I have searched a lot but couldn't find anything related to registering a user using smack api.
Please help me in the code as to how can I register a user using smack api and using openfire as the server.