Giter VIP home page Giter VIP logo

scormcloud-api-v2-client-java's People

Contributors

cojohnson1999 avatar dillgromble avatar mjschuetze102 avatar tedwards avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tanbinh123

scormcloud-api-v2-client-java's Issues

Jersey2 trying to use CXF classes

We are trying to use the java client library in our SpringBoot application to connect with Rustici Cloud. When we call any service using the client library, we are getting this error

 ERROR org.apache.cxf.jaxrs.utils.JAXRSUtils - No message body reader has been found for class com.rusticisoftware.cloud.v2.client.model.CourseListSchema, ContentType: application/json
  - should not throw exception when asked to fetch list of courses *** FAILED *** (1 second, 109 milliseconds)
    javax.ws.rs.client.ResponseProcessingException: No message body reader has been found for class com.rusticisoftware.cloud.v2.client.model.CourseListSchema, ContentType: application/json
    at org.apache.cxf.jaxrs.impl.ResponseImpl.reportMessageHandlerProblem(ResponseImpl.java:437)
    at org.apache.cxf.jaxrs.impl.ResponseImpl.doReadEntity(ResponseImpl.java:390)
    at org.apache.cxf.jaxrs.impl.ResponseImpl.readEntity(ResponseImpl.java:320)
    at org.apache.cxf.jaxrs.impl.ResponseImpl.readEntity(ResponseImpl.java:308)
    at com.rusticisoftware.cloud.v2.client.ApiClient.deserialize(ApiClient.java:564)
    at com.rusticisoftware.cloud.v2.client.ApiClient.invokeAPI(ApiClient.java:696)
    at com.rusticisoftware.cloud.v2.client.api.CourseApi.getCourses(CourseApi.java:943)
    at com.worldmanager.platform.modules.eLearning.library.RusticiIntegrationService.getCourses(RusticiIntegrationService.scala:24)
    at com.worldmanager.test.units.modules.eLearning.RusticiServiceSpec.$anonfun$new$3(RusticiServiceSpec.scala:23)
    at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)

In our application we are consuming some other services through CXF client. I can see that scormcloud-api-v2-client-java is using jersey2 as its java api client(instead of the default (okhttp-gson). Since our application is consuming some other services through CXF client, it seems like the scormcloud-api-v2-client-java library is picking up CXF Response implementation instead of the json implementation to read from the api.

To verify the issue, I created a separate test SpringBoot application just for testing scorm cloud via java client library. I worked fine as the application doesnt have any other functionality that uses cxf.

I also built custom-rustici-client-library from Swagger Codegen using your api specification. I didn't use jersey2 as the java api client. i.e. I went without specifying the library ( thus using the default option okhttp-gson) . I used the following using the config file for generating the client library.

{
    "apiPackage" : "api",
    "invokerPackage" : "com.rusticisoftware.cloud.v2.client",
    "apiPackage" : "com.rusticisoftware.cloud.v2.client.api",
    "modelPackage" : "com.rusticisoftware.cloud.v2.client.model",
    "groupId": "com.rusticisoftware.cloud.v2.client",
    "artifactId": "scormcloud-api-v2-client",
    "artifactId": "1.0.3"
} 

I was able to consume the rustici cloud api using this custom-rustici-client-library.

I have two questions.

  1. Is there a reason to use jersey2 as the java api client library?
  2. Can this client library be re-published using default client library(okhttp-gson) instead of jersey2 so that we dont have to maintain the client library ourselves?

ImportCourseWithoutUpload is missing referenceRequest option is sdk

As per the api documentation - https://rustici-docs.s3.amazonaws.com/engine/21.1.x/api/apiV2.html#/course/ImportCourseWithoutUpload,

importRequest can be set using
"referenceRequest": {
"url": "string",
"webPathToCourse": "string",
"mediaFileMetadata": {
"title": "string",
"description": "string",
"contentLanguage": "string",
"moveOn": "string",
"estimatedDuration": 0,
"activityType": "string",
"xAPIActivityId": "string",
"cmi5PublisherId": "string"
}
},

but, this option is missing from sdk.
SDK supports fetchRequest, mediaFileReferenceRequest and connectorReferenceRequest only.

Is it possible to add referenceRequest to the sdk ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.