0
votes

I am trying to add service reference to Visual Studio for REST API. The demo URL given to me by a DocuSign support engineer is as below.

https://demo.docusign.net/restapi/v2

But when I try to add it, I get the following error.

Do I need to add anything to web.config? Thanks in advance. I already have details related to SOAP in web.config. I added a second API URL string.

The document at the url https://demo.docusign.net/restapi/v2 was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'XML Schema' is 'Data at the root level is invalid. Line 1, position 1.'. - Report from 'DISCO Document' is 'Data at the root level is invalid. Line 1, position 1.'. - Report from 'WSDL Document' is 'There is an error in XML document (1, 1).'. - Data at the root level is invalid. Line 1, position 1. Metadata contains a reference that cannot be resolved: 'https://demo.docusign.net/restapi/v2'. There was no endpoint listening at https://demo.docusign.net/restapi/v2 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. The remote server returned an error: (404) Not Found. If the service is defined in the current solution, try building the solution and adding the service reference again.

1

1 Answers

0
votes

I recommend using the open source DocuSign NuGet package if you're using .NET / Visual Studio: https://github.com/docusign/docusign-csharp-client

You can install it in seconds from the Tools menu and it will install the dependencies and references for your project automatically, then you can add your using statements in your code.

To get started follow the README.