Account rsUserAccount = _accountSvc.getActiveAccountByName(resourceAdminAccount.getAccountName() + "-user", resourceAdminAccount.getDomainId());
List<UserVO> users = _userDao.listByAccount(rsUserAccount.getId());
User rsUser = users.get(0);
Configuration config = _configDao.findByName("endpointe.url");
StringBuffer sb = new StringBuffer();
sb.append("{ \"registration_info\" : { \"endpoint_url\" : \"" + encodeParam(config.getValue()) + "\", ");
sb.append("\"domain_id\" : \"" + resourceAdminAccount.getDomainId() + "\", ");
sb.append("\"admin_account\" : \"" + encodeParam(resourceAdminUser.getUsername()) + "\", ");
sb.append("\"admin_account_api_key\" : \"" + resourceAdminUser.getApiKey() + "\", ");
sb.append("\"admin_account_secret_key\" : \"" + resourceAdminUser.getSecretKey() + "\", ");
sb.append("\"user_account\" : \"" + encodeParam(rsUser.getUsername()) + "\", ");