1

我想获取课程中的所有活动。我使用了下面的代码,但结果是 0 记录。

public static ActivityVO[] getActivity(String p_courseId) {
        GetActivity l_getActivity = new GetActivity();
        ActivityFilter l_filter = new ActivityFilter();
        l_filter.setFilterType(3);
        l_filter.setCourseId(p_courseId);
        l_filter.setAvailable(true);
        l_filter.setUserid("loginUsername");
        Calendar l_start = Calendar.getInstance();
        Calendar l_end = Calendar.getInstance();
        l_start.set(2014,Calendar.JANUARY,1);
        l_end.set (2016,Calendar.MARCH,18);
        l_filter.setStartTime(l_start.getTimeInMillis()/1000);
        l_filter.setEndTime(l_end.getTimeInMillis()/1000);
        l_getActivity.setFilter(l_filter);
        try {
            System.out.println("->"+m_activityWS.getActivity(l_getActivity).get_return());
        } catch (RemoteException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
        try {
            return m_activityWS.getActivity(l_getActivity).get_return();
        } catch (RemoteException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }

谁能告诉我我是否遗漏了一些东西都提供了一个示例代码。提前致谢。

4

0 回答 0