Giter VIP home page Giter VIP logo

docusign / docusign-esign-java-client Goto Github PK

View Code? Open in Web Editor NEW
101.0 35.0 96.0 49.54 MB

The Official DocuSign Java Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.

Home Page: https://javadoc.io/doc/com.docusign/docusign-esign-java/latest/index.html

License: MIT License

Java 99.93% CSS 0.07%
electronic signature digitalsignature electronicsignature e-signature docusign java sdk rest

docusign-esign-java-client's Introduction

The Official DocuSign eSignature Java Client SDK

Build status Maven Central status

Requirements

Compatibility

  • Java 1.9+

Installation

This SDK is provided as open source, which enables you to customize its functionality to suit your particular use case. To do so, download or clone the repository. If the SDK’s given functionality meets your integration needs, or if you’re working through our code examples from the DocuSign Developer Center, you merely need to install it by following the instructions below.

Note: DocuSign uses Eclipse with Maven for testing purposes.

Maven:

  1. In Eclipse, create a new project by selecting File > New > Project.
  2. In the New Project Wizard, expand Maven, then select Maven Project.
  3. Leave Create a simple project unchecked.
  4. Select Next, then provide a unique groupId and artifactId.
  5. In the directory where you've saved your project, open the pom.xml file.
  6. In the pom.xml file, locate the dependencies node.
  7. Add:
    <dependency>
      <groupId>com.docusign</groupId>
      <artifactId>docusign-esign-java</artifactId>
      <version>3.18.0</version>
    </dependency>
    
  8. If your project is still open, restart Eclipse.

Dependencies

This client has the following external dependencies:

  • io.swagger:swagger-annotations:jar:1.5.17
  • org.glassfish.jersey.core:jersey-client:jar:2.29.1
  • org.glassfish.jersey.media:jersey-media-multipart:jar:2.29.1
  • org.glassfish.jersey.media:jersey-media-json-jackson:2.29.1
  • com.fasterxml.jackson.core:jackson-core:jar:2.12.1
  • com.fasterxml.jackson.core:jackson-annotations:jar:2.12.1
  • com.fasterxml.jackson.core:jackson-databind:2.12.1
  • junit:junit:jar:4.13.1
  • com.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2
  • com.auth0:java-jwt:3.4.1
  • org.bouncycastle:bcprov-jdk15on:1.60

Code examples

You can find on our GitHub a self-executing package of code examples for the eSignature Java SDK, called a Launcher, that demonstrates common use cases. You can also download a version preconfigured for your DocuSign developer account from Quickstart. These examples can use either the Authorization Code Grant or JSON Web Token (JWT) authentication workflows.

OAuth implementations

For details regarding which type of OAuth grant will work best for your DocuSign integration, see Choose OAuth Type in the DocuSign Developer Center.

For security purposes, DocuSign recommends using the Authorization Code Grant flow.

Support

Log issues against this client through GitHub. We also have an active developer community on Stack Overflow.

License

The DocuSign eSignature Java Client SDK is licensed under the MIT License.

Additional resources

docusign-esign-java-client's People

Contributors

asif-docusign avatar brettbatie avatar dbbrahmbhatt avatar dependabot[bot] avatar donglover avatar ds-jk avatar eleanorharris avatar ergin008 avatar garg-mudit avatar harsharahul avatar hobbyprojects avatar inbargazit avatar jerome-saltmarsh avatar kenharris avatar larryklugerds avatar lizhanhui avatar mallikarjun-malli avatar mattkingds avatar mikebz avatar mmallis87 avatar osidenate avatar psytester avatar rajrele avatar sebastianmgwozdz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docusign-esign-java-client's Issues

Setting custom fields programatically

Hi,

I have set few custom fields in my template and want to send an envelope programatically filling the custom fields in my application. I tried this and it did not work. Can you please help me out here?

`

       CustomFields fields = new CustomFields();
        TextCustomField tcf = new TextCustomField();
        tcf.setName("test");
        tcf.setValue("kabalikhan");
        tcf.setShow("true");

        List<TextCustomField> tcfs = new ArrayList<>();
        tcfs.add(tcf);
        fields.setTextCustomFields(tcfs);

        // send the envelope by setting |status| to "sent". To save as a draft set to "created"
        envDef.setCustomFields(fields);
        envDef.setStatus("sent");


        // instantiate a new EnvelopesApi object
        EnvelopesApi envelopesApi = new EnvelopesApi();


        // call the createEnvelope() API
        EnvelopeSummary envelopeSummary = envelopesApi.createEnvelope(accountId, envDef);

`

setConnectTimeout, setReadTimeout, setDebugging for OAUTH interaction

Setters in ApiClient for setConnectTimeout, setReadTimeout (see PR #62), and setDebugging are very helpful for debugging and stability.

However these settings get only active after authentication, but not for OAUTH interaction.
I.e., if the system connects to the oAuthBasePath during authentication with authName "docusignAccessCode", these settings are not active yet in the httpClient, which is created in the default constructor (see ApiClient.java:81).

It would be great, if we could have an extension of the following constructor into a new one:

ApiClient.java:134: --->
public ApiClient(String oAuthBasePath, String authName, String clientId, String secret)

New constructor:

public ApiClient(String oAuthBasePath, String authName, String clientId, String secret, int connectTimeout, int readTimeout, boolean isDebugging)

The new constructor can apply the setters in this sequence: setDebugging (first), setConnectTimeout, setReadTimeout.
setDebugging will create the new httpClient before the timeouts will be set on this new httpClient.

Afterwards, the following lines will use the client with the new setting:
ApiClient.java:109 ---> auth = new OAuth(httpClient, OAuthFlow.accessCode, oAuthBasePath + "/oauth/auth", oAuthBasePath + "/oauth/token", "all");

EnvelopesApi baseUrl not compatible with production baseUrl in LoginAccount

When I call authenticationApi.login().getLoginAccounts().get(0), the LoginAccount object's baseUrl is "https://na2.docusign.net/restapi/v2/accounts/[accountId]". Meanwhile EnvelopesApi appends "/v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields" to the apiClient's baseUrl. So if I blindly set the apiClient's base url with loginAccount.getBaseUrl via apiClient.setBasePath(loginAccount.getBaseUrl()); EnvelopesApi will issue this request: "https://na2.docusign.net/restapi/v2/accounts/{accountId}/v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"

To use the baseUrl returned during login, it looks like i need to take a substring up to /restapi and set that as the apiClient's baseUrl (https://na2.docusign.net/restapi).

If I don't use the baseUrl returned during login, and continue using https://www.docusign.net/restapi to download an envelope pdf, I get a USER_AUTHENTICATION_FAILED error.

missing statements build.gradle

packagingOptions {
    exclude  'META-INF/LICENSE'
    exclude  'META-INF/jersey-module-version'
}

need to add that to build.gradle (Module: app)

Conflict with dropwizard and docusign

Below is my pom. I use dropwizard 1.0.2. Docusign library expects a jersey-multipart 1.19.2 library because of which a conflict is arising with my application(Since it expects com.sun.jersey core libraries version 1 and jsr version 1) but my application uses jax rs 2 libraries . What to do here? Please help

`

4.0.0
com.postbox
postbox
1.0-SNAPSHOT

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <dropwizard.version>1.0.2</dropwizard.version>
    <neo4j.version>2.3.1</neo4j.version>
</properties>

<dependencies>

    <dependency>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-core</artifactId>
        <version>${dropwizard.version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-dbcp2</artifactId>
        <version>2.1.1</version>
    </dependency>

    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-pubsub</artifactId>
        <version>v1-rev8-1.21.0</version>
    </dependency>

    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-gmail</artifactId>
        <version>v1-rev36-1.20.0</version>
    </dependency>

    <dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client</artifactId>
        <version>1.20.0</version>
        <exclusions>
            <exclusion>  <!-- declare the exclusion here -->
                <groupId>com.google.guava</groupId>
                <artifactId>guava-jdk5</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>19.0</version>
    </dependency>

    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.38</version>
    </dependency>

    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache</artifactId>
        <version>2.9.0</version>
    </dependency>

    <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>mongodb-driver</artifactId>
        <version>3.2.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.2</version>
    </dependency>

    <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>1.8.3</version>
    </dependency>

    <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1.1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-email</artifactId>
        <version>1.3.1</version>
    </dependency>

    <dependency>
        <groupId>com.docusign</groupId>
        <artifactId>docusign-esign-java</artifactId>
        <version>2.0.2</version>
        <exclusions>
            <exclusion>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-json-provider</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-client</artifactId>
            </exclusion>
            <!--exclusion>
                <groupId>com.sun.jersey.contribs</groupId>
                <artifactId>jersey-multipart</artifactId>
            </exclusion-->

        </exclusions>
    </dependency>


    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>2.23.1</version>
    </dependency>

    <dependency>
        <groupId>com.google.gdata</groupId>
        <artifactId>core</artifactId>
        <version>1.47.1</version>
        <exclusions>
            <exclusion>  <!-- declare the exclusion here -->
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>com.bugsnag</groupId>
        <artifactId>bugsnag</artifactId>
        <version>LATEST</version>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <createDependencyReducedPom>true</createDependencyReducedPom>
                <filters>
                    <filter>
                        <artifact>*:*</artifact>
                        <excludes>
                            <exclude>META-INF/*.SF</exclude>
                            <exclude>META-INF/*.DSA</exclude>
                            <exclude>META-INF/*.RSA</exclude>
                        </excludes>
                    </filter>
                </filters>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <transformers>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                <mainClass>com.postbox.configuration.PostBoxApplication</mainClass>
                            </transformer>
                        </transformers>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

`

Recipient Information

Hi!

I think the you need to add a

DocusignClient.requestRecipientInformation(String envelopeId, boolean includeTabs)

method.

It took me some times to discover why the the signers' tabs were null :)

Options classes using Strings to represent Boolean values

This is an enhancement request to have the options objects using boolean or Boolean values, rather than String values set to "true" or "false". The apiClient.parameterToPairs method that is called would handle converting a boolean value to the proper String value further down the line.

One example class doing this:

public class ListRecipientsOptions  {
	private String includeAnchorTabLocations = null;
	private String includeExtended = null;	
	private String includeTabs = null;
	...
}

In the meantime, I'm using Boolean.TRUE.toString() and Boolean.FALSE.toString() to avoid hard-coding the words "true" and "false" in my code, but using actual boolean values would be cleaner.

Jackson-core version conflict

Hi,
I am using dropwizard for developing my application. When I included docusign as a dependency I got version conflict of library jackson core. I am using jackson - core 2.6.3 but it look likes docusign is using 2.4.2.

This is the error i am getting

Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.isExpectedStartObjectToken()Z
at com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer.deserializeObject(JsonNodeDeserializer.java:207)
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:69)
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:15)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3708)
at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:2113)
at io.dropwizard.configuration.ConfigurationFactory.build(ConfigurationFactory.java:87)
at io.dropwizard.cli.ConfiguredCommand.parseConfiguration(ConfiguredCommand.java:115)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:64)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:80)

EnvelopesAPI trips on listTabs method - unable to de-serialize API response

TL;DR

Tabs tabs = envelopesApi.listTabs(
loginAccount.getAccountId(),
envelope.getEnvelopeId(),
signer.getRecipientId(),
listTabsOptions);

throws ClientHandlerException.

Jackson: version 2.7.0 (same as master branch and recent tagged releases)
With debugging enabled, the API response looks very reasonable to me, but I don't know how to check the response against the model.

Stack trace (complete) is below.

com.sun.jersey.api.client.ClientHandlerException: com.fasterxml.jackson.databind.JsonMappingException: Unexpected token (START_OBJECT), expected START_ARRAY: expected String, Number or JSON Array
at [Source: java.io.BufferedInputStream@75961f16; line: 201, column: 5] (through reference chain: com.docusign.esign.model.Tabs["dateTabs"]->java.util.ArrayList[0])
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:644)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:604)
at com.docusign.esign.client.ApiClient.invokeAPI(ApiClient.java:758)
at com.docusign.esign.api.EnvelopesApi.listTabs(EnvelopesApi.java:4109)
at ly.generalassemb.data.batch.DocuSignPollTasklet.execute(DocuSignPollTasklet.java:200)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:395)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:267)
at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:77)
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:368)
at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:253)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:141)
at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:380)
at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:124)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:301)
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:134)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:117)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy29.run(Unknown Source)
at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.execute(JobLauncherCommandLineRunner.java:207)
at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.executeLocalJobs(JobLauncherCommandLineRunner.java:224)
at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.launchJobFromProperties(JobLauncherCommandLineRunner.java:122)
at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.run(JobLauncherCommandLineRunner.java:116)
at org.springframework.boot.SpringApplication.runCommandLineRunners(SpringApplication.java:634)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:652)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:909)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:898)
at ly.generalassemb.data.batch.SampleBatchApplicationTests.testDefaultSettings(SampleBatchApplicationTests.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.boot.test.OutputCapture$1.evaluate(OutputCapture.java:50)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Unexpected token (START_OBJECT), expected START_ARRAY: expected String, Number or JSON Array
at [Source: java.io.BufferedInputStream@75961f16; line: 201, column: 5] (through reference chain: com.docusign.esign.model.Tabs["dateTabs"]->java.util.ArrayList[0])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216)
at com.fasterxml.jackson.databind.DeserializationContext.wrongTokenException(DeserializationContext.java:962)
at com.fasterxml.jackson.datatype.joda.deser.LocalDateDeserializer.deserialize(LocalDateDeserializer.java:65)
at com.fasterxml.jackson.datatype.joda.deser.LocalDateDeserializer.deserialize(LocalDateDeserializer.java:15)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:277)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1534)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:944)
at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:811)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:634)
... 65 more

SimpleDateFormat Exception in Java 1.6

Hi Team,

Java version: 1.6
I am getting below exception when initializing APIClient.

java.lang.IllegalArgumentException: Illegal pattern character 'X'
at java.text.SimpleDateFormat.compile
at java.text.SimpleDateFormat.initialize
at java.text.SimpleDateFormat.
at java.text.SimpleDateFormat.

Getting exception in below line in ApiClient.java

DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");

I really need to release DocuSign to production soon. Please help on this.

Thanks,
Surya.

Program type already present: org.apache.oltu.oauth2.common.OAuth$HttpMethod

Hello!!

I am trying to implement docusign in my Android App, but when i add the line of the implementation in my build.graddle always see the same error:

Program type already present: org.apache.oltu.oauth2.common.OAuth$HttpMethod
Message{kind=ERROR, text=Program type already present: org.apache.oltu.oauth2.common.OAuth$HttpMethod, sources=[Unknown source file], tool name=Optional.of(D8)}

I am downloaded the docusign-android-starter-kit too and it have the same error.
I had search a solution but nothing its valid i try add the depencie like this, but not working...

implementation ("com.docusign:docusign-esign-java:2.6.1"){ exclude group: 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2' }

Could anyone help me?
Very thanks!

Unable to prepopulate the custom fields in a template

I have followed through the example mentioned in the ticket docusign/docusign-esign-csharp-client#75. However in my case I am still running into issue with populate with the values dynamically. Any guidance will be appreciated.

In my case template is populated with default values, however I am trying to override with default values.

My sample code

        // create a template role with a valid templateId and roleName and assign signer info
        TemplateRole tRole = new TemplateRole();
        tRole.setRoleName("Individual");

        Tabs tabs = new Tabs();

        List<Text> textTabs = new ArrayList<>();

        Text textTab = new Text();
        textTab.setName("principalLastName");
        textTab.setTabLabel("Last Name");
        textTab.setValue("MyInput1");
     
         Text textTab1 = new Text();
 
        textTab1.setTabLabel("schoolAddress1");
        textTab1.setValue("123 Main street");

         // create a list of template roles and add our newly created role
         textTabs.add(textTab);
         textTabs.add(textTab1);
         tRole.setTabs(tabs);

        tRole.setName("Some Name");
        tRole.setEmail([email protected]");

         java.util.List<TemplateRole> templateRolesList = new java.util.ArrayList<TemplateRole>();
         templateRolesList.add(tRole);

Attached the sample image for reference of the custom fileds.

image

[SdkUnitTests]java.util.Base 64 since java 1.8

Hi,
I cannot compile project with JDK 1.7 becasue the project is instacing a java JRE class called Base64 which is new in JRE 1.8

Is it mandatory to compile and work with this library under JRE 1.8?

Wrong link to jar download

The README states:

Others
Or you can manually download and add the following JARs to your project:
The docusign-esign-java-2.4.0 JAR.

But that link doesn't bring you to a jar download, just to the release github feed of the project...

Java Sample Code - does not result in email being sent to signer

1st time user of Docusign. Apologises in advance, but this is the only place I could find to register these issues.
I am following instructions from Quick Start guide, Item 5 esign a document through your app, sub-element 2. Create Envelope

  1. java source provided wont compile,
    envelopeId.append( envelopeSummary.getEnvelopeId() );
    no previous definition of envelopeId to append to, line not needed to get sample to work. perhaps just comment it out
  2. clientUserId property, text discusses the need to set this value and code sets it
    // Must set |clientUserId| for embedded recipients and provide the same value when requesting // the recipient view URL in the next step signer.setClientUserId("1001");

However, it seems this line prevents the actual email from being sent to the signer. I sent to both a gmail and a yahoo account, neither got the email. Verified email "sent" by signing into dev sandbox and going to My Documents. emails were sent. Searched on SO and found this: Docusign Email delivery issues

Try removing the CaptiveInfo node from the request body (also removing the ClientUserId node that's located within it). DocuSign should send the signing invitation email to the recipient if you omit those elements from the request.

From the above suggestion, I commented out the setClientUserId line, and began receiving emails on both accounts. Not sure if this is the best fix, but for me the first thing I want to see is the email being sent.
3. Trivial Typo, setEmailSubject
envDef.setEmailSubject("Please sign this document sent from Java SDK)");
contains an extra ')' inside the double-quotes, just looks weird on the subject line.

thanks,
Tim

IllegalArgumentException on constructor in Android

Hi,
I cannot instantiate a new ApiClient() because the DateFormat used is not supported on Android:
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
throws:
java.lang.IllegalArgumentException: Unknown pattern character 'X' at java.text.SimpleDateFormat.validatePatternCharacter(SimpleDateFormat.java:323) at java.text.SimpleDateFormat.validatePattern(SimpleDateFormat.java:312) at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:365) at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:258) at com.docusign.esign.client.ApiClient.buildDefaultDateFormat(ApiClient.java:87) at com.docusign.esign.client.ApiClient.<init>(ApiClient.java:69) at com.docusign.esign.client.Configuration.<clinit>(Configuration.java:5) at com.docusign.esign.api.AuthenticationApi.<init>(AuthenticationApi.java:18) 

It seems that the X is not supported on Android:
http://stackoverflow.com/questions/28373610/android-parse-string-to-date-unknown-pattern-character-x

Is there a way to use an empty constructor and set the objectMapper with the right configuration in android?

Thanks in advance

jackson jars are creating a compatibility issue - JodaModule and Module classes

Hi,
I'm trying to use this jar with Hybris(SAP ecommerce product). It uses Spring 4.3.3 .
I've put in the same version of jars that are in the pom.xml file. But i keep getting the below exception(marked in bold). Is there a way to resolve this?

ERROR [localhost-startStop-1] [DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Cannot create inner bean '(inner bean)#5a46c695' of type [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter] while setting bean property 'messageConverters' with key [6]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#5a46c695': Cannot create inner bean '(inner bean)#6eb64770' of type [org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#6eb64770': Invocation of init method failed; nested exception is java.lang.ClassCastException: com.fasterxml.jackson.datatype.joda.JodaModule cannot be cast to com.fasterxml.jackson.databind.Module
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:382) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:157) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1486) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1231) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) [catalina.jar:7.0.59]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) [catalina.jar:7.0.59]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) [catalina.jar:7.0.59]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262) [catalina.jar:7.0.59]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550) [catalina.jar:7.0.59]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.59]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) [catalina.jar:7.0.59]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) [catalina.jar:7.0.59]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_92]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_92]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_92]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]

ClientHandlerException on Jersey

I'm writing an Android application and I want integrate DocuSign. I took the code from here: https://www.docusign.com/developer-center/api-overview

That code code won't work though on Android as for example the authApi.login(loginOps) is making network calls on the main thread. Therefore, I'm executing that code in a background thread. Thereafter I receive that:

 E/ClientResponse: A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/json; charset=utf-8 was not found
 E/ClientResponse: The registered message body readers compatible with the MIME media type are:
 */* ->
 com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider

The response that I'm getting looks like:

{
  "loginAccounts": [
      {
        "name": "...",
        "accountId": "...",
        "baseUrl": "https://demo.docusign.net/....",
        "isDefault": "true",
        "userName": "...",
        "userId": "...",
        "email": "...",
        "siteDescription": ""
      }
  ],
  "apiPassword": "..."
}

Also in the response headers the content type is:

Content-Type → application/json; charset=utf-8

The response seems to be a valid JSON by the DocuSign's Java API fails to parse it. Do you know how can I overcome this problem?

maven missing dependency

Hey I think you might need to add jersey-core to the pom file.
I was getting this error when calling AuthenticationApi.login, and fixed it by adding jersey-core to my dependencies:

Caught exception: class java.lang.RuntimeException - java.lang.NoClassDefFoundError: com/sun/jersey/spi/inject/Errors$Closure!
java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/jersey/spi/inject/Errors$Closure
at play.mvc.Security$AuthenticatedAction.call(Security.java:52) ~[play_2.11-2.3.10.jar:2.3.10]
at validators.LogAction.call(LogAction.java:23) ~[classes/:na]
at play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82) [play_2.11-2.3.10.jar:2.3.10]
at play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82) [play_2.11-2.3.10.jar:2.3.10]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) [scala-library-2.11.6.jar:na]
Caused by: java.lang.NoClassDefFoundError: com/sun/jersey/spi/inject/Errors$Closure
at com.docusign.esign.client.ApiClient.getClient(ApiClient.java:671) ~[docusign-esign-java-2.0.0.jar:na]
at com.docusign.esign.client.ApiClient.getAPIResponse(ApiClient.java:429) ~[docusign-esign-java-2.0.0.jar:na]
at com.docusign.esign.client.ApiClient.invokeAPI(ApiClient.java:543) ~[docusign-esign-java-2.0.0.jar:na]
at com.docusign.esign.api.AuthenticationApi.login(AuthenticationApi.java:147) ~[docusign-esign-java-2.0.0.jar:na]
at services.DocuSignService.downloadFile(DocuSignService.java:131) ~[classes/:na]
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.spi.inject.Errors$Closure
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_79]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_79]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_79]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_79]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_79]

Received DocumentPDFs in the xml files when eventNotification.setIncludeDocuments("false")

I will recevied DocumentPDFs in the xml by webhook when eventNotification.setIncludeDocuments("false"). But i wan't recevied it, what should i do?

EventNotification eventNotification = new EventNotification(); eventNotification.setUrl("https://****************"); eventNotification.setLoggingEnabled("true"); eventNotification.setRequireAcknowledgment("true"); eventNotification.setUseSoapInterface("false"); eventNotification.setIncludeCertificateWithSoap("false"); eventNotification.setSignMessageWithX509Cert("false"); eventNotification.setIncludeDocuments("false"); eventNotification.setIncludeEnvelopeVoidReason("true"); eventNotification.setIncludeTimeZone("true"); eventNotification.setIncludeSenderAccountAsCustomField("true"); eventNotification.setIncludeDocumentFields("false"); eventNotification.setIncludeCertificateOfCompletion("false");

image

ClientHandlerException with FoldersApi#moveEnvelopes

This is to re-open issue #28

I have an exception thrown by the client when using FoldersApi#moveEnvelopes :

`FoldersRequest foldersRequest = new FoldersRequest();
foldersRequest.setEnvelopeIds(Collections.singletonList(envelopeId));

try {
new FoldersApi().moveEnvelopes(accountId, "recyclebin", foldersRequest);
} catch (ClientHandlerException ignored) {
//
}`
Here is the trace I get :

SEVERE: A message body reader for Java class com.docusign.esign.model.FoldersResponse, and Java type class com.docusign.esign.model.FoldersResponse, and MIME media type application/octet-stream was not found Aug 29, 2016 7:05:29 AM com.sun.jersey.api.client.ClientResponse getEntity SEVERE: The registered message body readers compatible with the MIME media type are: */* -> com.sun.jersey.core.impl.provider.entity.FormProvider com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider com.sun.jersey.core.impl.provider.entity.StringProvider com.sun.jersey.core.impl.provider.entity.ByteArrayProvider com.sun.jersey.core.impl.provider.entity.FileProvider com.sun.jersey.core.impl.provider.entity.InputStreamProvider com.sun.jersey.core.impl.provider.entity.DataSourceProvider com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General com.sun.jersey.core.impl.provider.entity.ReaderProvider com.sun.jersey.core.impl.provider.entity.DocumentProvider com.sun.jersey.core.impl.provider.entity.SourceProvider$StreamSourceReader com.sun.jersey.core.impl.provider.entity.SourceProvider$SAXSourceReader com.sun.jersey.core.impl.provider.entity.SourceProvider$DOMSourceReader com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$General com.sun.jersey.core.impl.provider.entity.EntityHolderReader application/octet-stream -> com.sun.jersey.core.impl.provider.entity.ByteArrayProvider com.sun.jersey.core.impl.provider.entity.FileProvider com.sun.jersey.core.impl.provider.entity.InputStreamProvider com.sun.jersey.core.impl.provider.entity.DataSourceProvider com.sun.jersey.core.impl.provider.entity.RenderedImageProvider

I notice that the Java Docusign API's method signature is as follows:

public FoldersResponse moveEnvelopes(String accountId, String folderId, FoldersRequest foldersRequest) throws ApiException

However, when I call the endpoint manually with a curl, there is no body. Thus there can be no return type of FoldersResponse.

curl -X PUT \ https://demo.docusign.net/restapi/v2/accounts/2009849/folders/sentitems \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-docusign-authentication: { \"Username\":\"{username}\", \"Password\":\"{password}\", \"IntegratorKey\":\"{Integrator Key}\" }' \ -d '{ "envelopeIds": ["3f909e7f-5618-484c-9268-f49a667e985c"], "fromFolderId": "recyclebin" }'

When I clone the repository and change the method signature as follows:

public void moveEnvelopes(String accountId, String folderId, FoldersRequest foldersRequest) throws ApiException

And modify the invokeAPI as follows:

apiClient.invokeAPI(path, "PUT", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);

The problem is solved. I was originally using 2.0.2 and upgraded to 2.3.0 and this bug exists across both of these versions.

Thanks,

Courtney Arnold
Western Governors University

List Status won't accept envelopeIds

I am trying to get a list of envelope statuses by ids like so:

EnvelopeIdsRequest envelopesIds = new EnvelopeIdsRequest();
envelopesIds.addEnvelopeIdsItem("example-guid-id");
EnvelopesInformation envInformation = envelopesApi.listStatus(accountId, envelopesIds);

However when I call List Status I get the following error:

Exception: com.docusign.esign.client.ApiException: Error while requesting server, received a non successful HTTP code 400 with response Body: '{
  "errorCode": "INVALID_REQUEST_PARAMETER",
  "message": "The request contained at least one invalid parameter. Query parameter 'from_date' must be set to a valid DateTime, or 'envelope_ids' or 'transaction_ids' must be specified."
}'

The error says that I'm not providing one of from_date, envelope_ids, or transaction_ids. I am able to update the query with a from date and it will work:

ListStatusOptions listStatusOptions = envelopesApi.new ListStatusOptions();
listStatusOptions.setFromDate("02/02/2018");

EnvelopeIdsRequest envelopesIds = new EnvelopeIdsRequest();
envelopesIds.addEnvelopeIdsItem("example-guid-id");
EnvelopesInformation envInformation = envelopesApi.listStatus(accountId, envelopesIds, listStatusOptions);

However when I do the above, the api returns all envelope status changes since the from date regardless of its id. Transaction Ids appear to be ignored as well.

It seems like the SDK is either providing the envelopeIds incorrectly to the api, or the api is incorrectly reading the envelope ids in the request. Looking at the api docs the envelopeIds are supposed to be in the request body. Looking at the SDK source this seems to be done correctly according to the documentation:

So is it an issue with the api? Or am I making a mistake with the SDK?

JNI error on application start

Hi,

After I added docusign to pom and installed the dependency I can't start my Vert.x application. It's throwing a JNI error.

<dependency>
     <groupId>com.docusign</groupId>
     <artifactId>docusign-esign-java</artifactId>
     <version>2.4.2</version>
   </dependency>

Then in the console:

mvn clean install
mvn clean package

start app:

java -jar target\eSignApi-1.0-SNAPSHOT-fat.jar

Results in this:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
        at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
        at sun.security.util.SignatureFileVerifier.process(Unknown Source)
        at java.util.jar.JarVerifier.processEntry(Unknown Source)
        at java.util.jar.JarVerifier.update(Unknown Source)
        at java.util.jar.JarFile.initializeVerifier(Unknown Source)
        at java.util.jar.JarFile.getInputStream(Unknown Source)
        at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Source)
        at sun.misc.Resource.cachedInputStream(Unknown Source)
        at sun.misc.Resource.getByteBuffer(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

If i remove docusign dependency and rebuild: app will start normally.

API Client oauth base path

We would like to create a local server that mocks the docusign API to run local tests against. The method ApiClient.configureJWTAuthorizationFlow() accepts the oAuthBasePath as an input parameter, so I can pass the path to our mock service. However, ApiClient.getUserInfo() calls ApiClient.getOAuthBasePath(0 which returns a hard-coded value. The createEnvelopes and createRecipientView methods use the basePath variable, which I am able to override. Is it possible to refactor the getUserInfo() method to be more consistent with the other methods and pull in the base URL variable in a way that I can override? Perhaps mark it as protected or set the base path to a variable that I can access?

Issue in Android integration

I am trying to integrate java client within a basic Android app from template without any business logics or customization. All dependencies are as is, only adding dependence to docusign as below.
And app could not be built due issue below. Please help!

======Error:
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

===== gradle.build:
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.gaoj.docupoc"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    multiDexEnabled true

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

packagingOptions {
    pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyReader'
    pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyWriter'
    pickFirst 'META-INF/services/com.sun.jersey.spi.inject.InjectableProvider'
    pickFirst 'META-INF/jersey-module-version'
    pickFirst 'META-INF/NOTICE'
    pickFirst 'META-INF/LICENSE'
    pickFirst 'META-INF/services/com.fasterxml.jackson.databind.Module'
    pickFirst 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec'
    pickFirst 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'

implementation "com.docusign:docusign-esign-java:2.4.0"

// testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.1'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

Thanks,
JG

{"error":"invalid_grant"} Error while requesting an access token. No accessTokenResponse object recieved, maybe a non HTTP 200 received?

I use code example on https://github.com/docusign/docusign-code-examples/tree/master/java .But get an error in "getAuthToken()" method,The error message is as follows:
{"error":"invalid_grant"}
Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: Error while requesting an access token. No accessTokenResponse object recieved, maybe a non HTTP 200 received?
I'm sure the code is right,because it works when using other's clientID and integrator key. My account is free, Other's account is not free, Do i must buy it?

Spring Autowired not worlking

IN my spring project I included

com.docusign docusign-esign-java 2.0.1

and my autowiring stop working.I am using spring 3.1.4 version and already have soap implementation of docusign but for offline esign I need to use rest.

any help will be greatly appreciated .

EnvelopesApi does not retrieve certificate of completion at getDocument

There is no possibility to return the certificate of completion when using the EnvelopesApi

EnvelopesApi envelopesApi = new EnvelopesApi(apiClient);

byte[] fileContent = envelopesApi.getDocument(accountId, envelopeId, "combined");

  • this will return the combined documents from the given envelope, but there is no way to specify the inclusion of the certificate of completion.

DocuSign permits the retrieval of the combined documents together with their certificate of completion via:
GET /restapi/v2/accounts/:id/envelopes/:envelopeId/documents/combined?certificate=true
i.e.: using the query param: ?certificate=true

Knowing the above, this issue seems to be a docusign-java-client API bug.

Production integrator key returning 0 login accounts

My integrator key was working fine in demo environment and I managed to shift the key to production successfully. (When I go to production admin console, the key is listed under APIs and Keys section)

Problem is when I try to create the apiClient object with the production properties, I get an IndexOutOfBoundsException since loginInfo.getLoginAccounts() collection is empty. I use the service integration code segment which has given in the ReadMe of java sdk repository.

`AuthenticationApi authApi = new AuthenticationApi();
LoginInformation loginInfo = authApi.login();

    // parse first account ID (user might belong to multiple accounts) and baseUrl
    String accountBaseUrl = loginInfo.getLoginAccounts().get(0).getBaseUrl();
    String[] accountDomain = accountBaseUrl.split("/v2");`

Any idea to resolve this issue? I am days behind to go live my project. So appreciate a quick response on this. Thanks

listStatus throws ApiException when only envelopeIds are specified

Hi,
I have problem with listStatus method on EnvelopesApi class.
When I set only envelopeId I get ApiException:
com.docusign.esign.client.ApiException: {
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. Query parameter 'from_date' must be set to a valid DateTime, or 'envelope_ids' or 'transaction_ids' must be specified."
}

My code looks like this:

EnvelopesApi envelopesApi = new EnvelopesApi();
EnvelopeIdsRequest envelopeIdsRequest = new EnvelopeIdsRequest();
List<String> envelopeIds = new ArrayList<>();
envelopeIds.add("722c9f87-a1e0-4d19-9aea-0552c4a2e4a6");
envelopeIdsRequest.setEnvelopeIds(envelopeIds);
EnvelopesInformation envelopesInformation = envelopesApi.listStatus("myAccountId", envelopeIdsRequest);

I am using version 2.3.0 of docusign-esign-java

getting internal error trying to get userInfo

Trying to get authorized after
apiClient.configureJWTAuthorizationFlow(new ClassPathResource("key_docusign_pub.rsa").getFile().getAbsolutePath(), new ClassPathResource("key_docusign.pem").getFile().getAbsolutePath(), OAuthBaseUrl, IntegratorKey, UserApiID, 3600); OAuth.UserInfo userInfo = apiClient.getUserInfo(apiClient.getAccessToken());
and while getting userInfo I'm getting an error

com.docusign.esign.client.ApiException: Error while fetching user info: Error while requesting server, received a non successful HTTP code 401 with response Body: '{"error":"internal_server_error","reference_id":"58c96d39-20db-42d7-b789-4628c0511d68"}'

Error while requesting an access token. No accessTokenResponse object recieved, maybe a non HTTP 200 received?

My access token is null. I dont know how to get the code that is sent back form DocuSign as query param in the redirect uri.

public String getAuthToken(ApiClient apiClient)
{
// IMPORTANT: after the login, DocuSign will send back a fresh authorization code as a query param
// of the redirect URI. You should set up a route that handles the redirect call to get that code
// and pass it to token endpoint as shown in the next lines:
String code = "[YOUR_AUTHORIZATION_CODE_GOES_HERE]";
// assign it to the token endpoint
apiClient.getTokenEndPoint().setCode(code);
// optionally register to get notified when a new token arrives
apiClient.registerAccessTokenListener(new AccessTokenListener() {
@OverRide
public void notify(BasicOAuthToken token) {
System.out.println("Got a fresh token: " + token.getAccessToken());
}
});
// following call exchanges the authorization code for an access code and updates
// the Authorization: bearer <token> header on the api client
apiClient.updateAccessToken();
// retrieve the base uri for core API service requests
System.out.println("Getting base_uri...");
return getBaseUri(apiClient);
}

Typo in Usage example

I believe the variable String integratorKey = "[INTEGRATOR_KEY]"; should start with a capital I for the code to compile.

ApiClient: oAuth Api setting HTTP Header "Cache-Control: no-store"

According to RFC-6749 OAuth 2.0 and RFC-6819 OAuth 2.0 Security
the oAuth client should explicitly set in client request HTTP headers "Cache-Control: no-store" and "Pragma: no-cache"
The current ApiClient code results into "Cache-Control: no-cache" and "Pragma: no-cache" is used.
We do not send "Cache-Control: no-store" to oAuth server.
For sure, the client application can modify the apiClient content, but to support RFC compliance out of the box in api integration, the docusign client api should set internally the related HTTP header.

Value for 'purgeState' must be 'documents_queued' or 'documents_and_metadata_queued'

Hello,

I am trying to delete an envelope and I guess I found a bug. This should work after signature as well as after sending the envelope. I try to set the purge status and I am getting an error.

My Code is:
`public Envelope purgeEnvelope( ApiClient apiClient, String envelopeId )
throws Exception
{
Envelope envelope = null;

    try
    {
        // assign api client to the Configuration object
        Configuration.setDefaultApiClient( apiClient );

        // Get Account id
        String accountId = getLoginAccountId();

        // Create instance of EnvelopeApi
        EnvelopesApi envelopesApi = new EnvelopesApi();

        // Gets the envelope
        envelope = getEnvelope( apiClient, envelopeId );


        if ( envelope.getStatus().equals( "completed" ) == false )
        {
            // Sets status to 'created' (required for setting status to complete)
            envelope.setStatus( "created" );
            envelopesApi.update( accountId, envelopeId, envelope );

            // Sets status to 'completed' (required for purging envelope)
            envelope.setStatus( "completed" );
            envelopesApi.update( accountId, envelopeId, envelope );
        }

        // Sets the purge state
        envelope.setPurgeState( "documents_and_metadata_queued" );
        envelopesApi.update( accountId, envelopeId, envelope );
    }
    catch ( ApiException e )
    {
        throw new ApiException( 500, e.getMessage() );
    }
    catch ( Exception e )
    {
        throw new ApiException( 500, e.getMessage() );
    }

    return envelope;

}`

The following error appears:
com.docusign.esign.client.ApiException: { "errorCode": "INVALID_REQUEST_PARAMETER", "message": "The request contained at least one invalid parameter. Value for 'purgeState' must be 'documents_queued' or 'documents_and_metadata_queued'." } at com.uds.webadmin.docusign.CDocusignCore.purgeEnvelope(CDocusignCore.java:433) at com.uds.webadmin.server.CRestDocusign.voidEnvelope(CRestDocusign.java:533) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at com.uds.webadmin.server.CGWTCacheControlFilter.doFilter(CGWTCacheControlFilter.java:63) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at com.uds.webadmin.server.CCharsetFilter.doFilter(CCharsetFilter.java:40) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:745) Feb 05, 2016 10:09:44 AM com.sun.jersey.spi.container.ContainerResponse logException SCHWERWIEGEND: Mapped exception to response: 500 (Internal Server Error)

requestSignatureFromDocuments: UTF-8 chars problem

Situation: I create an embbed envelope with one signer called: Iñaki García.

Problem: When I watch the envelope created in Docusign webapp, the name of the signer is worng defined like 'I?anki Garc´?a' equals than signer signs the document via signingUrl.

How could rest API support utf-8 ?

Thanks

ClientHandlerException with FoldersApi#moveEnvelopes

Hello,

I have an exception thrown by the client when using FoldersApi#moveEnvelopes :

FoldersRequest foldersRequest = new FoldersRequest();
foldersRequest.setEnvelopeIds(Collections.singletonList(envelopeId));

try {
    new FoldersApi().moveEnvelopes(accountId, "recyclebin", foldersRequest);
} catch (ClientHandlerException ignored) {
// 
}

Here is the trace I get :

SEVERE: A message body reader for Java class com.docusign.esign.model.FoldersResponse, and Java type class com.docusign.esign.model.FoldersResponse, and MIME media type application/octet-stream was not found
Aug 29, 2016 7:05:29 AM com.sun.jersey.api.client.ClientResponse getEntity
SEVERE: The registered message body readers compatible with the MIME media type are:
*/* ->
  com.sun.jersey.core.impl.provider.entity.FormProvider
  com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider
  com.sun.jersey.core.impl.provider.entity.StringProvider
  com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
  com.sun.jersey.core.impl.provider.entity.FileProvider
  com.sun.jersey.core.impl.provider.entity.InputStreamProvider
  com.sun.jersey.core.impl.provider.entity.DataSourceProvider
  com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General
  com.sun.jersey.core.impl.provider.entity.ReaderProvider
  com.sun.jersey.core.impl.provider.entity.DocumentProvider
  com.sun.jersey.core.impl.provider.entity.SourceProvider$StreamSourceReader
  com.sun.jersey.core.impl.provider.entity.SourceProvider$SAXSourceReader
  com.sun.jersey.core.impl.provider.entity.SourceProvider$DOMSourceReader
  com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
  com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
  com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General
  com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$General
  com.sun.jersey.core.impl.provider.entity.EntityHolderReader
application/octet-stream ->
  com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
  com.sun.jersey.core.impl.provider.entity.FileProvider
  com.sun.jersey.core.impl.provider.entity.InputStreamProvider
  com.sun.jersey.core.impl.provider.entity.DataSourceProvider
  com.sun.jersey.core.impl.provider.entity.RenderedImageProvider

I'm using the 2.0.2 version of the client.

Thanks,

Joris

Exception fetching template

We were usign version 2.0.2 but, when upgrading to 2.1.0 we got an exception fetching a template.

Current code:

        // We do not pass TemplatesApi with ApiClient as we have configured a default value previously
        TemplatesApi templatesApi = new TemplatesApi();
        try {
            // Line throwing the exception
            EnvelopeTemplate result = templatesApi.get(this.docuSignAccountId, templateId); 
            return new DocuSignTemplateDetails(templateId, result.getEnvelopeTemplateDefinition().getName());          
        } catch (ApiException e) {
            throw new InternalErrorException("Error accessing DocuSign", e);
        }

When the code above is executed, the following exception is thrown:

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class com.docusign.esign.model.Number] from Floating-point number (1.0); no one-double/Double-arg constructor/factory method
 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@4406e562; line: 60, column: 29] (through reference chain: com.docusign.esign.model.EnvelopeTemplate["recipients"]->com.docusign.esign.model.Recipients["signers"]->java.util.ArrayList[0]->com.docusign.esign.model.Signer["tabs"]->com.docusign.esign.model.Tabs["signHereTabs"]->java.util.ArrayList[0]->com.docusign.esign.model.SignHere["scaleValue"])
	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
	at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:878)
	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromDouble(StdValueInstantiator.java:337)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromDouble(BeanDeserializerBase.java:1198)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:149)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
	at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1470)
	at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:912)
	at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:811)
	at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:634)

It seems there is an error with the construction of the output object from the JSON returned by docusign.
We checked http status code and is 200.
We are able to execute listTemplates but not get for a template.

Empty response body in ApiException

Under ApiClient.invokeAPI an ApiException is being created with constructor public ApiException(String message). The message includes the response body as part of an exception error message and does not populate fields like responseHeaders and responseBody in ApiException. This makes it inconvenient for clients to parse out the error message returned by docusign.

Please construct the ApiException in a different way so that the responseBody is populated correctly. I am using version 2.4.2.

Organization not mapped in Oauth.UserInfo.Account

We are using the ApiClient to create envelopes using admin consent to impersonate the user. However, when I call
apiClient.getUserInfo(apiClient.getAccessToken())
I receive the following error:

`com.docusign.esign.client.ApiException: Error while fecthing user info: Unrecognized field "organization" (class com.docusign.esign.client.auth.OAuth$UserInfo$Account), not marked as ignorable (4 known properties: "is_default", "account_id", "base_uri", "account_name"])
at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 356] (through reference chain: com.docusign.esign.client.auth.OAuth$UserInfo["accounts"]->java.util.ArrayList[0]->com.docusign.esign.client.auth.OAuth$UserInfo$Account["organization"])

at com.docusign.esign.client.ApiClient.getUserInfo(ApiClient.java:565)
at com.docusign.esign.client.ApiClient$getUserInfo$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)`

It appears that com.docusign.esign.client.auth.OAuth.UserInfo.Account does not have any mapping for the organization information included in the user info JSON response.

Unable to revoke OAuth token

Hi,

Tested with 7bd34fd using the following test:

import com.docusign.esign.api.AuthenticationApi;
import com.docusign.esign.client.ApiClient;
import org.junit.Before;
import org.junit.Test;

public class RevokeTest {

    private AuthenticationApi api;

    @Before
    public void setUp() {
        ApiClient client = new ApiClient();
        client.setDebugging(true);
        api = new AuthenticationApi(client);
    }

    @Test
    public void testRevoke() throws Exception {
        api.revokeOAuthToken();
    }
}

This test fails with the following exception:

com.docusign.esign.client.ApiException: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>


	at com.docusign.esign.client.ApiClient.invokeAPI(ApiClient.java:773)
	at com.docusign.esign.api.AuthenticationApi.revokeOAuthToken(AuthenticationApi.java:314)
	at RevokeTest.testRevoke(RevokeTest.java:19)
....	

Running the test with -Djavax.net.debug=ssl:record:plaintext demonstrates that there is no Content-Length header sent by Jersey client (Google jersey content-length 0 - seems to be notorious issue).
Please see the output of setDebugging(true) + -Djavax.net.debug=ssl:record:plaintext in attached file
jersey.log

Thanks!

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.