public static MoodleGroupUser[] getMembersFromGroupIds(long[] groupids) throws MoodleRestGroupException, UnsupportedEncodingException, MoodleRestException {
        Vector v=new Vector();
        MoodleGroupUser user=null;
        StringBuilder data=new StringBuilder();
        String functionCall=MoodleCallRestWebService.isLegacy()?MoodleServices.MOODLE_GROUP_GET_GROUP_MEMBERS:MoodleServices.CORE_GROUP_GET_GROUP_MEMBERS;
        if (MoodleCallRestWebService.getAuth()==null)
            throw new MoodleRestGroupException();
        else
            data.append(MoodleCallRestWebService.getAuth());
        data.append("&").append(URLEncoder.encode("wsfunction", MoodleServices.ENCODING)).append("=").append(URLEncoder.encode(functionCall, MoodleServices.ENCODING));
        for (int i=0;i<groupids.length;i++) {
            if (groupids[i]<1) throw new MoodleRestGroupException(); data.append("&").append(URLEncoder.encode("groupids["+i+"]", MoodleServices.ENCODING)).append("=").append(groupids[i]);
        }
        data.trimToSize();
        NodeList elements=MoodleCallRestWebService.call(data.toString());
        user=null;
        for (int j=0;j<elements.getLength();j+=2) {
            String content1=elements.item(j).getTextContent();
            String content2=elements.item(j+1).getTextContent();
            user=new MoodleGroupUser(Long.parseLong(content1),Long.parseLong(content2));
            v.add(user);
        }
        if (user!=null)
            v.add(user);
        MoodleGroupUser[] users=new MoodleGroupUser[v.size()];
        for (int i=0;i<v.size();i++) {
            users[i]=(MoodleGroupUser)v.get(i);
        }
        v.removeAllElements();
        return users;
    }