我想要获取课程中的所有活动。我使用下面的代码,但它导致我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;
}
任何人都可以告诉我,如果我遗失了一些东西都提供了示例代码。 提前谢谢。