docusign / docusign-esign-java-client

The Official Docusign Java Client Library used to interact with the eSignature REST API. Send, sign, and approve documents using this client.
https://javadoc.io/doc/com.docusign/docusign-esign-java/latest/index.html
MIT License
105 stars 96 forks source link

MismatchedInputException when getting form data using the envelopes API #194

Closed tylerbarker-toast closed 3 years ago

tylerbarker-toast commented 3 years ago

Whenever I make a call to get the form data of an envelope envelopesApi.getFormData(accountId, envelopeId), I get the following exception:

! com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList<com.docusign.esign.model.FormDataItem>` from Object value (token `JsonToken.START_OBJECT`)
!  at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 1815] (through reference chain: com.docusign.esign.model.EnvelopeFormData["prefillFormData"])
! at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)

I am able to log into Docusign and download the form data manually, but I need to be able to do this via the API.

mmallis87 commented 3 years ago

@tylerbarker-toast the fix was just release please update to 3.13.1-RC1. Feel free to reopen if the problem persists.

Please refer to this test case for a working example: https://github.com/docusign/docusign-esign-java-client/blob/master/src/test/java/SdkUnitTests.java#L1670

mmallis87 commented 3 years ago

Those who use SDK version 2 can upgrade to 2.21.1-RC1 if they're not ready to make the move to version 3.