0

I have registered my account in DocuSign and using SOAP interface.I am able to login successfully using the following code.

Login code

  var req = new LoginRequest() { Body = body };
     var result = credential.Login(req);

     if (result.Body != null && result.Body.LoginResult != null)
     {
        var account = result.Body.LoginResult.Accounts.First();        
        var BaseUrl = account.BaseUrl;
        var AccountId = account.AccountID;
        var UserName = account.AccountName;
        var Email = account.Email;
     }

However, I am getting Unspecified error while creating envelope. Also, Do I need to use the BaseUrl in creating envelope?

Header for request

 request = base.GetWebRequest(uri) as HttpWebRequest;
 request.Headers.Add("X-DocuSign-Authentication",
 string.Format("<DocuSignCredentials><Username>{0}</Username>
    <Password>{1}</Password><IntegratorKey>{2}</IntegratorKey></DocuSignCredentials>", 
     UserName, Password,integratorkey));

Code for creating envelope

 //Create new envelope
  var envelope = new Envelope();
  envelope.AccountId = "***";
  envelope.Subject = "envelope subject";

  //Create the Receipents
  recipient[] recipients;
  recipients.Add(new recipient{ .... });
  envelope.Recipients = recipients

  //Grab and make the Documents 
  Document[] documents;
  documents.Add(new Document{ ... });
  envelope.Documents = documents;

  var docusignWebService = new DocuSignWebService();
  docusignWebService.UserName = "****"; // user email id
  docusignWebService.Password = "****"; //user password
  docusignWebService.AccountId = "****";

  //create envelope
  docusignWebService.CreateEnvelope(envelope);

We were using the same code for an enterprise and it was working perfectly, But now its not working for individual account. We are getting an Unspecified_Error and inner exception is null.

Padmalochan
  • 1,070
  • 1
  • 11
  • 21
  • 1
    Can you share the code or XML you're using for the create envelope request? Also the details of the Unspecified error so we can see if it's coming from DocuSign or your code. – reinkesm Nov 25 '14 at 21:35
  • @reinkesm I have added the code used for CreateEnvelope in description above. Not sure if its issue with baseurl or request header. – Padmalochan Nov 26 '14 at 15:45
  • What environment are you hitting, demo (ie demo.docusign.net) or production (ie na1.docusign.net)? Also, have you added the services as a Service Reference? You need to add as a Service Reference, not a Web Reference. Check out these two previous posts as they may help [one](http://stackoverflow.com/questions/19303022/docusign-soapapi-sample-doesnt-work/19308077#19308077) [two](http://stackoverflow.com/questions/20686436/why-is-my-wcf-web-service-presenting-this-object-in-a-different-namespace-with-d) – Ergin Dec 01 '14 at 23:42

0 Answers0