I have written this code to create users through web services.Hope somebody finds this useful.
function cregister_userregister_submit($form, &$form_state)
{
$name=$form_state['values']['username'];
$pass=$form_state['values']['password'];
$mail=$form_state['values']['email'];
require_once("sites/all/libraries/xmlrpc/lib/xmlrpc.inc");
// Turn the node ID into a standard XMLRPC data type, for transmission
// Create an XMLRPC message
$param1= array('name' => new xmlrpcval($name, 'string'));
$retval = new xmlrpcval();
$retval->addStruct($param1);
$param2 = array('pass' => new xmlrpcval($pass,'string'));
$retval->addStruct($param2);
$param3 = array('mail' => new xmlrpcval($mail,'string'));
$retval->addStruct($param3);
$param4 = array('name' => new xmlrpcval('phunsuk','string'));
$retval2 = new xmlrpcval();
$retval2->addStruct($param4);
$str2=new xmlrpcresp($retval2);
$str=new xmlrpcresp($retval);
$m = new xmlrpcmsg('user.create',array($str->value()));
$m2 = new xmlrpcmsg('profile.create',array($str2->value()));
// Note that the "optional" second parameter is required, but it can be empty.
// If you omit it, services returns wrong-parameter-number errors
// Create a connection to the remote server
// Note the root URL is services/xmlrpc. If you don't turn the