ellucian-developer / integration-sdk-java Goto Github PK
View Code? Open in Web Editor NEWJava framework for interacting with Ethos Integration.
License: Apache License 2.0
Java framework for interacting with Ethos Integration.
License: Apache License 2.0
The change notifications json schema seems to have changed since version 1.0.1 of this sdk was released. The json payload returned from Ethos now contains a messageType
field that is not included in the com.ellucian.ethos.integration.client.messages.ChangeNotification
class model, e.g.:
{
"id": "..",
"published": "2023...",
"resource": {...},
"operation": "created",
"contentType": "resource-representation",
"content": {...},
"publisher": {...},
"messageType": "change-notification"
}
This leads to a Jackson exception when trying to deserialize a response consumed with the Ethos messages client:
var apiKey= "xx...";
var client = new EthosClientBuilder();
var messageClient = client.buildEthosMessagesClient();
messageClient.setRegion(SupportedRegions.EUROPE);
var changeNotifications = messageClient.consumeWithLimit(100);
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "messageType" (class com.ellucian.ethos.integration.client.messages.ChangeNotification), not marked as ignorable (7 known properties: "contentType", "operation", "content", "id", "publisher", "published", "resource"])
at [Source: (StringReader); line: 1, column: 1617] (through reference chain: java.lang.Object[][0]->com.ellucian.ethos.integration.client.messages.ChangeNotification["messageType"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1127)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2036)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1700)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1678)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:320)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:214)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:24)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3597)
at com.ellucian.ethos.integration.client.messages.ChangeNotificationFactory.createCNListFromJson(ChangeNotificationFactory.java:42)
at com.ellucian.ethos.integration.client.EthosResponseConverter.toChangeNotificationList(EthosResponseConverter.java:393)
at com.ellucian.ethos.integration.client.messages.EthosMessagesClient.getMessages(EthosMessagesClient.java:163)
at com.ellucian.ethos.integration.client.messages.EthosMessagesClient.consumeWithLimit(EthosMessagesClient.java:92)
It would be great to get an updated model(s) released.
A useful enhancement would be to allow a custom Jackson ObjectMapper to be configured via the EthosClientBuilder
. Clients could then set DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
or apply custom Mixins for cases where the Ethos implementation and this sdk are out of sync.
var customMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
var builder = new EthosClientBuilder("apikey")
.withConnectionTimeout(30)
.withConnectionRequestTimeout(30)
.withSocketTimeout(30)
.withObjectMapper(customMapper);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.