Closed ccnokes closed 2 years ago
I put together a test case demonstrating it here: https://replit.com/@ccnokes/InternationalAttentiveVisitors#Main.java
That might take awhile to run, but the the output is this:
it works! the envelope id is: e97e5c95-9c23-49f7-9628-9977f71fc162
error Unrecognized field "PDFBytes" (class com.docusign.esign.model.EnvelopeDocument), not marked as ignorable (26 known properties: "display", "authoritativeCopy", "signerMustAcknowledge", "documentBase64", "name", "uri", "attachmentTabId", "order", "containsPdfFormFields", "displayMetadata", "authoritativeCopyMetadata", "documentFields", "availableDocumentTypes", "documentId", "signerMustAcknowledgeMetadata", "templateRequired", "errorDetails", "addedRecipientIds", "includeInDownloadMetadata", "sizeBytes", "includeInDownload", "nameMetadata", "documentIdGuid", "pages", "templateLocked", "type"])
at [Source: (BufferedInputStream); line: 92, column: 26] (through reference chain: com.docusign.esign.model.Envelope["envelopeDocuments"]->java.util.ArrayList[0]->com.docusign.esign.model.EnvelopeDocument["PDFBytes"])
So when that PDFBytes
property is removed, it works. Let me know if you need any more info!
@ccnokes First of all I apologize that your concern wasn't addressed in a timely fashion. It must has fallen between the cracks.
Adding this statement to the ObjectMapper will ignore extra fields such as PDFBytes
, if that's an acceptable behavior for you: mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
Here the fully working example: https://replit.com/@mmallis87/InternationalAttentiveVisitors#EnvelopeReader.java
I have a DocuSign connect web hook handler that looks like this:
But it fails on the JSON parse step. When I inspect the payload it receives vs the classes it tries to parse to, it looks like the
PDFBytes
property doesn't exist inEnvelopeDocument
and there's no ignore unknown properties annotation, so it fails. That's my best guess. I'm new to Java development 😅. I have the include documents option enabled on my connect web hook configuration but when I disable it, it works.