Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientHandlerException with FoldersApi#moveEnvelopes #28

Closed
JorisPotier opened this issue Aug 29, 2016 · 4 comments
Closed

ClientHandlerException with FoldersApi#moveEnvelopes #28

JorisPotier opened this issue Aug 29, 2016 · 4 comments
Labels

Comments

@JorisPotier
Copy link

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

@mmallis87
Copy link
Contributor

@JorisPotier I apologize for the long delay to address your issue.

Does this happens only for this particular function? or is there other functions that throw similar errors.

Also are you using Maven or Gradle? Would it be possible to share you build settings including the dependencies.

@mmallis87
Copy link
Contributor

Closing the issue because it's environment-specific (setting up dependencies for existing java projects is out of the scope of this library). Also no updates for a while.

@cbriarnold
Copy link

@JorisPotier @mmallis87
I am having this same problem. 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

@mmallis87
Copy link
Contributor

@JorisPotier version 2.10.0-RC1 contains the fix. Please give it a try. You can see the code change as part of #108 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants