public Boolean updateUserProfile( String userId, String profileName, PrivacyFieldDTO[] profileData) { try { org.wso2.carbon.dashboard.social.stub.types.carbon.PrivacyFieldDTO[] profileDataArray = new org.wso2.carbon.dashboard.social.stub.types.carbon.PrivacyFieldDTO [profileData.length]; int index = 0; for (PrivacyFieldDTO data : profileData) { org.wso2.carbon.dashboard.social.stub.types.carbon.PrivacyFieldDTO obj = new org.wso2.carbon.dashboard.social.stub.types.carbon.PrivacyFieldDTO(); obj.setFieldName(data.getFieldName()); obj.setVisibilityValue(data.getVisibilityValue()); profileDataArray[index++] = obj; } return stub.updateUserProfile(userId, profileName, profileDataArray); } catch (RemoteException e) { log.error(e.getMessage(), e); return false; } }