diff --git a/CHANGELOG.md b/CHANGELOG.md
index 20184dcd..dd8f4db1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
# DocuSign Java Client Changelog
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
+## [v2.21.1-RC1] - eSignature API v2.-21.1.02.00 - 2021-05-28
+### Fixed
+- Issue [`#194`](https://github.com/docusign/docusign-java-client/issues/194): Error Reading Entity from Input Stream. (DCM-5802)
+
## [v2.21.0-RC1] - eSignature API v2-21.1.02.00 - 2021-05-24
### Removed
- Removed methods `getAccountSettingsExport`,`getSealProviders` from Accounts.
diff --git a/README.md b/README.md
index 1e5f2a74..8d1dbb3c 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ This SDK is provided as open source, which enables you to customize its function
com.docusign
docusign-esign-java
- 2.21.0-RC1
+ 2.21.1-RC1
```
8. If your project is still open, restart Eclipse.
diff --git a/build.gradle b/build.gradle
index 30986375..93a0c205 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.docusign'
-version = '2.21.0-RC1'
+version = '2.21.1-RC1'
buildscript {
repositories {
diff --git a/pom.xml b/pom.xml
index c4c60d45..ac971f52 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
docusign-esign-java
jar
docusign-esign-java
- 2.21.0-RC1
+ 2.21.1-RC1
The official DocuSign eSignature JAVA client is based on version 2 of the DocuSign REST API and provides libraries for JAVA application integration. It is recommended that you use this version of the library for new development.
https://developers.docusign.com
diff --git a/src/main/java/com/docusign/esign/client/ApiClient.java b/src/main/java/com/docusign/esign/client/ApiClient.java
index 1989799e..bc67e246 100644
--- a/src/main/java/com/docusign/esign/client/ApiClient.java
+++ b/src/main/java/com/docusign/esign/client/ApiClient.java
@@ -84,7 +84,7 @@ public ApiClient() {
this.dateFormat = new RFC3339DateFormat();
// Set default User-Agent.
- setUserAgent("Swagger-Codegen/2.21.0-RC1/java");
+ setUserAgent("Swagger-Codegen/2.21.1-RC1/java");
// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap();
diff --git a/src/main/java/com/docusign/esign/model/EnvelopeFormData.java b/src/main/java/com/docusign/esign/model/EnvelopeFormData.java
index a99517ff..ca45f978 100644
--- a/src/main/java/com/docusign/esign/model/EnvelopeFormData.java
+++ b/src/main/java/com/docusign/esign/model/EnvelopeFormData.java
@@ -2,6 +2,7 @@
import java.util.Objects;
import java.util.Arrays;
+import com.docusign.esign.model.EnvelopeFormDataPrefillFormData;
import com.docusign.esign.model.NameValue;
import com.docusign.esign.model.RecipientFormData;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -25,7 +26,7 @@ public class EnvelopeFormData {
private java.util.List formData = null;
@JsonProperty("prefillFormData")
- private java.util.List prefillFormData = null;
+ private EnvelopeFormDataPrefillFormData prefillFormData = null;
@JsonProperty("recipientFormData")
private java.util.List recipientFormData = null;
@@ -98,29 +99,21 @@ public void setFormData(java.util.List formData) {
this.formData = formData;
}
- public EnvelopeFormData prefillFormData(java.util.List prefillFormData) {
+ public EnvelopeFormData prefillFormData(EnvelopeFormDataPrefillFormData prefillFormData) {
this.prefillFormData = prefillFormData;
return this;
}
- public EnvelopeFormData addPrefillFormDataItem(NameValue prefillFormDataItem) {
- if (this.prefillFormData == null) {
- this.prefillFormData = new java.util.ArrayList();
- }
- this.prefillFormData.add(prefillFormDataItem);
- return this;
- }
-
/**
- *
+ * Get prefillFormData
* @return prefillFormData
**/
@ApiModelProperty(value = "")
- public java.util.List getPrefillFormData() {
+ public EnvelopeFormDataPrefillFormData getPrefillFormData() {
return prefillFormData;
}
- public void setPrefillFormData(java.util.List prefillFormData) {
+ public void setPrefillFormData(EnvelopeFormDataPrefillFormData prefillFormData) {
this.prefillFormData = prefillFormData;
}
diff --git a/src/main/java/com/docusign/esign/model/EnvelopeFormDataPrefillFormData.java b/src/main/java/com/docusign/esign/model/EnvelopeFormDataPrefillFormData.java
new file mode 100644
index 00000000..fa2ddb1e
--- /dev/null
+++ b/src/main/java/com/docusign/esign/model/EnvelopeFormDataPrefillFormData.java
@@ -0,0 +1,87 @@
+package com.docusign.esign.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.docusign.esign.model.NameValue;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * EnvelopeFormDataPrefillFormData
+ */
+
+public class EnvelopeFormDataPrefillFormData {
+ @JsonProperty("formData")
+ private java.util.List formData = null;
+
+ public EnvelopeFormDataPrefillFormData formData(java.util.List formData) {
+ this.formData = formData;
+ return this;
+ }
+
+ public EnvelopeFormDataPrefillFormData addFormDataItem(NameValue formDataItem) {
+ if (this.formData == null) {
+ this.formData = new java.util.ArrayList();
+ }
+ this.formData.add(formDataItem);
+ return this;
+ }
+
+ /**
+ *
+ * @return formData
+ **/
+ @ApiModelProperty(value = "")
+ public java.util.List getFormData() {
+ return formData;
+ }
+
+ public void setFormData(java.util.List formData) {
+ this.formData = formData;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ EnvelopeFormDataPrefillFormData envelopeFormDataPrefillFormData = (EnvelopeFormDataPrefillFormData) o;
+ return Objects.equals(this.formData, envelopeFormDataPrefillFormData.formData);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(formData);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EnvelopeFormDataPrefillFormData {\n");
+
+ sb.append(" formData: ").append(toIndentedString(formData)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/src/test/java/SdkUnitTests.java b/src/test/java/SdkUnitTests.java
index 5d9952d0..c6792dd0 100644
--- a/src/test/java/SdkUnitTests.java
+++ b/src/test/java/SdkUnitTests.java
@@ -1704,6 +1704,58 @@ public void DeleteSigningGroupUserTest()
}
}
+ @Test
+ public void GetFormDataTest() {
+ System.out.println("\nGetFormDataTest:\n" + "===========================================");
+ ApiClient apiClient = new ApiClient(BaseUrl);
+ //String currentDir = System.getProperty("user.dir");
+
+ try {
+ // IMPORTANT NOTE:
+ // the first time you ask for a JWT access token, you should grant access by making the following call
+ // get DocuSign OAuth authorization url:
+ //String oauthLoginUrl = apiClient.getJWTUri(IntegratorKey, RedirectURI, OAuthBaseUrl);
+ // open DocuSign OAuth authorization url in the browser, login and grant access
+ //Desktop.getDesktop().browse(URI.create(oauthLoginUrl));
+ // END OF NOTE
+
+ java.util.List scopes = new ArrayList();
+ scopes.add(OAuth.Scope_SIGNATURE);
+
+ OAuth.OAuthToken oAuthToken = apiClient.requestJWTUserToken(IntegratorKey, UserId, scopes, privateKeyBytes, 3600);
+ Assert.assertNotSame(null, oAuthToken);
+ // now that the API client has an OAuth token, let's use it in all
+ // DocuSign APIs
+ apiClient.setAccessToken(oAuthToken.getAccessToken(), oAuthToken.getExpiresIn());
+ UserInfo userInfo = apiClient.getUserInfo(oAuthToken.getAccessToken());
+ Assert.assertNotSame(null, userInfo);
+ Assert.assertNotNull(userInfo.getAccounts());
+ Assert.assertTrue(userInfo.getAccounts().size() > 0);
+
+ System.out.println("UserInfo: " + userInfo);
+ // parse first account's baseUrl
+ // below code required for production, no effect in demo (same
+ // domain)
+ apiClient.setBasePath(userInfo.getAccounts().get(0).getBaseUri() + "/restapi");
+ Configuration.setDefaultApiClient(apiClient);
+ String accountId = userInfo.getAccounts().get(0).getAccountId();
+
+ EnvelopesApi envelopesApi = new EnvelopesApi();
+ String envelopeId = "137e8369-3242-438e-ab0f-4808ec6047cd";
+ EnvelopeFormData envelopeFormData = envelopesApi.getFormData(accountId, envelopeId);
+ Assert.assertNotNull(envelopeFormData);
+ Assert.assertNotNull(envelopeFormData.getFormData());
+ Assert.assertNotNull(envelopeFormData.getFormData().get(0));
+ Assert.assertNotNull(envelopeFormData.getFormData().get(0).getName());
+
+ System.out.println("EnvelopeFormData: " + envelopeFormData);
+ } catch (ApiException ex) {
+ Assert.fail("Exception: " + ex);
+ } catch (Exception e) {
+ Assert.fail("Exception: " + e.getLocalizedMessage());
+ }
+ }
+
@Test
public void testRevoke() throws Exception {
ApiClient apiClient = new ApiClient(BaseUrl);