jb31639

Error trying to use gradebookWS in building block

Discussion created by jb31639 on Jul 10, 2016
Latest reply on Jul 19, 2016 by Alberto Ruiz

Hello

I'm trying to use the AllTheDucks webservice to make REST calls using the GradebookWS behind the SOAP calls.

 

This is available at:

GitHub - AllTheDucks/atd-bbws: Blackboard Gradebook REST Web Service Building Block

 

I'm trying to replace the assessment calls

 

public List<AssessmentItemDto> getAssessmentItemsForCourse(@PathParam("courseId") String courseId

Line 97 in

atd-bbws/CoursesResource.java at master · AllTheDucks/atd-bbws · GitHub

with GradebookWS calls to get grades and attempts. I thought something like this would work:

 

ScoreFilter filter = new ScoreFilter();

  filter.setFilterType(GradebookWSConstants.GET_SCORE_BY_COURSE_ID);

  // based on: https://github.com/shurrey/BBDN-WS-Grading-Schema/blob/master/src/main/java/bbdn/wsapi/gradebook/toolkit/Helper.java

  GradebookWS gb = GradebookWSFactory.getGradebookWSForTool();//  .getGradebookWS();

  ScoreVO grades[] = gb.getGrades(courseId, filter);

      gradeItems = convertToGradeItems(grades);

 

 

This seems to fail with the following errors:

 

INFO   | jvm 1    | 2016/07/10 22:36:19 | Jul 10, 2016 10:36:19 PM org.apache.catalina.core.StandardWrapperValve invoke

INFO   | jvm 1    | 2016/07/10 22:36:19 | SEVERE: Servlet.service() for servlet [com.alltheducks.bbws.ws.BbWebServiceApplication] in context with path [/webapps/atd-bbws-BBLEARN] threw exception [blackboard.platform.ws.WebserviceException: [WSFW001]Invalid session] with root cause

INFO   | jvm 1    | 2016/07/10 22:36:19 | blackboard.platform.ws.WebserviceException: [WSFW001]Invalid session

INFO   | jvm 1    | 2016/07/10 22:36:19 | at blackboard.platform.ws.AxisHelpers.throwWSException(AxisHelpers.java:330)

INFO   | jvm 1    | 2016/07/10 22:36:19 | at blackboard.platform.ws.AxisHelpers.throwWSException(AxisHelpers.java:321)

INFO   | jvm 1    | 2016/07/10 22:36:19 | at blackboard.platform.ws.WebserviceContext.getCurrentSession(WebserviceContext.java:581)

INFO   | jvm 1    | 2016/07/10 22:36:19 | at blackboard.platform.ws.WebServiceWrapper.invoke(WebServiceWrapper.java:195)

INFO   | jvm 1    | 2016/07/10 22:36:19 | at com.sun.proxy.$Proxy408.getGrades(Unknown Source)

INFO   | jvm 1    | 2016/07/10 22:36:19 | at com.alltheducks.bbws.ws.CoursesResource.getGradesForCourse(CoursesResource.java:202)

INFO   | jvm 1    | 2016/07/10 22:36:19 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 

 

Any ideas as to why I'm getting:

INFO   | jvm 1    | 2016/07/10 22:36:19 | at com.sun.proxy.$Proxy408.getGrades(Unknown Source)

 

Thanks

Jason

Outcomes