try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
GetUserCall getUserCall = new GetUserCall(apiContext);
DetailLevelCodeType[] detailLevel = {DetailLevelCodeType.RETURN_ALL};
getUserCall.setDetailLevel(detailLevel);
UserType user = getUserCall.getUser();
if (user != null) {
email = user.getEmail();
AddressType regAddress = user.getRegistrationAddress();
if (regAddress != null) {
cityName = regAddress.getCityName();
companyName = regAddress.getCompanyName();
country = regAddress.getCountryName();
firstName = regAddress.getFirstName();
lastName = regAddress.getLastName();
name = regAddress.getName();
phone = regAddress.getPhone();
postalCode = regAddress.getPostalCode();
stateOrProvince = regAddress.getStateOrProvince();
street = regAddress.getStreet();
street1 = regAddress.getStreet1();
street2 = regAddress.getStreet2();
}
if (firstName == null && lastName == null && name !=null) {
String nameArray[] = name.split(" ");
firstName = nameArray[0];
lastName = nameArray[1];
}
registrationAddress.put("cityName", cityName);
registrationAddress.put("companyName", companyName);
registrationAddress.put("country", country);
registrationAddress.put("firstName", firstName);
registrationAddress.put("lastName", lastName);
registrationAddress.put("phone", phone);
registrationAddress.put("postalCode", postalCode);
registrationAddress.put("stateOrProvince", stateOrProvince);
registrationAddress.put("street", street);
registrationAddress.put("street1", street1);
registrationAddress.put("street2", street2);
status = user.getStatus().toString();
}
result.put("email", email);
result.put("registrationAddress", registrationAddress);
result.put("status", status);
} catch (Exception e) {