While performing callouts over Docusign API (here) from an Apex class it works fine. And whenever I try to introduce any Asynchronous callouts (future / batch) it generates an error.

I'm wondering why this is happening as there is only the difference of mechanism here. So, it works perfectly in a normal Apex call.

My Bussiness process to call the api has changed: I want to make callouts on record Update / Create / Delete event. So, Trigger is the only way I need to use. And to make callouts from a Trigger require an Asynchronous call (via future annotated with callouts=true). But this doesn't work for me currently.

So, I end up making this Business Process with 2 solutions (neither of them is working):

1). Apex Trigger -> Apex Class containing a future method annotated callouts=true.
2). Apex Trigger -> Apex Batch with Database.AllowsCallouts implementation

Following is the error I'm getting using Asynchronous call:

Web service callout failed: WebService returned a SOAP Fault: An Error Occurred during anchor tag processing. Invalid document faultcode=soap:Client faultactor=https://www.docusign.net/api/3.0/dsapi.asmx"

I’m pretty sure that this is Salesforce related error but I can’t fathom out why.


2 Answers 2


I looked on Google, it appears someone else had the same issue over the DocuSign boards.


Looks like you need to use a different endpoint:


  • Thanks for this but this doesn't solve my problem yet!
    – sanchit
    Feb 6, 2014 at 12:42
  • Do you get the same error even after changing the endpoint from dsapi.asmx to api.asmx? Feb 6, 2014 at 13:21
  • Yes, its the same error I'm still getting.
    – sanchit
    Feb 6, 2014 at 13:49

I ran across the same DocuSign exception message. The root cause in my case was the document blob, or more specifically the underlying code used to generate the blob. I use a visualforce page to render the pdf and the page's controller wasn't assigning a variable that is used in the page. Seeing the exception message in the logs helped pinpoint the cause.

System.debug('Rendering the doc');
PageReference pageRef = new PageReference('/apex/caseDoc');
// test methods do not support getContent(). Added try catch for purposes of testing.
try {
    pdfBlob = pageRef.getContent();
} catch (VisualforceException e){
    pdfBlob = Blob.valueof('Case Doc');
    system.debug('***doc exception');

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .