try {
UserServiceSoapServiceLocator uService = new UserServiceSoapServiceLocator();
UserServiceSoap userService = uService.getPortal_UserService(_getURL("Portal_UserService"));
UserSoap user = userService.getUserById(Integer.parseInt(userId));
if (user != null) {
// user attributes
HashMap<String, String> userAttributes = new HashMap<String, String>();
userAttributes.put("USER_ID", String.valueOf(user.getUserId()));
userAttributes.put("NAME", user.getFirstName());
userAttributes.put("SURNAME", user.getLastName());
userAttributes.put("E_MAIL", user.getEmailAddress());
//set up the userID with email - adress
profile.setUserName(user.getEmailAddress());
profile.setUserId(user.getEmailAddress());
logger.debug("user.getUserId()="+ user.getUserId());
logger.debug("user.getScreenName()="+ user.getScreenName());
logger.debug( "user.getFirstName()="+ user.getFirstName());
logger.debug( "user.getLastName()="+ user.getLastName());
profile.setAttributes(userAttributes);
// user roles
RoleServiceSoapServiceLocator rService = new RoleServiceSoapServiceLocator();