43288

DocuSign SoapAPI Sample doesn't work

I'm just getting started with the DocuSign SOAP API, and I'm using the examples from their developer site as well as the GitHub site. While the two bits of code don't quite match, neither seems to work. I keep getting a System.ServiceModel.FaultException with the message, "Security requirements are not satisfied because the security header is not present in the incoming message."

I'm using a Service Reference with VS2012 to proxy the service https://demo.docusign.net/api/3.0/dsapi.asmx, and I have verified that my account works by using the online REST API explorer to obtain login information for my demo account.

Anyone run into this or have any suggestions?

Answer1:

I was getting the same error message until I changed the binding element in my web.config to match this:

<binding name="APIServiceSoap" allowCookies="true" maxReceivedMessageSize="50000000"> <security mode="TransportWithMessageCredential" /> </binding>

A Github DocuSign SDK that was a valuable resource for me: https://github.com/docusign/DocuSign-eSignature-SDK

Also, as in the Github link above, I am using 2 Service References (CredentialAPI and DocuSignAPI).

Answer2:

I found that I had to create a Service Reference (and not a Web Reference) pointed to https://demo.docusign.net/api/3.0/dsapi.asmx (and not https://demo.docusign.net/api/3.0/api.asmx as the sample at http://www.docusign.com/p/APIGuide/Content/DocuSignService%20API%20Overview/Code%20Samples.htm suggests).

I also had to make sure that I added the "X-DocuSign-Authentication" to the request headers by using a version of the sample code here http://www.docusign.com/p/APIGuide/APIGuide.htm#Introduction+Changes/Using DocuSign WSDLs in the Net Environment.htm%3FTocPath%3DUsing%20DocuSign%20WSDLs%7C___1

Answer3:

There are two way to pass member credentials using DocuSign's SOAP API:

<ol> <li>SOAP Header via WS-Security UsernameToken</li> <li>HTTP Header via a custom field “X-DocuSign-Authentication”</li> </ol>

The DocuSign SOAP API has two different end points where everything is identical except for authentation: API.asmx and DSAPI.asmx. The API.asmx end point requires the WS-Security UsernameToken in the SOAP header authentication. The DSAPI.asmx and AccountManagement.asmx end points require the HTTP Header authentication method.

See DocuSign's SOAP documentation for more info: http://www.docusign.com/developer-center/documentation

Recommend

  • Variant of defaultdict for assigning value only once
  • Converting a data frame into named object in R
  • How can i compile & run a c program (with OpenMP) in gem5 Full System?
  • Get or convert Week of year to ISO week
  • How to distribute Java-based software?
  • How to remove left and right margins from all wrapped rows in flexbox (without nth-child or js)
  • Unable to run SDL program in Eclipse but able to do so in Windows Explorer
  • Generating anchors with PyYAML.dump()?
  • Configure Spring's MappingJacksonHttpMessageConverter
  • How to use function wrapper in mustache.php?
  • Possible to “watch” both HAML and SASS at the same time?
  • How to autopopulate a field in SugarCRM form
  • Authentication in Play! and RestEasy
  • Problem while Building a Setup Project for a windows Service?
  • jQuery ready not fired after rails link_to is clicked
  • PHP buffered output depending on server setting?
  • How to attach a node.js readable stream to a Sendgrid email?
  • Bad request using file_get_contents for PUT request in PHP
  • Django rest serializer Breaks when data exists
  • Recording logins for password protected directories
  • Java Scanner input dilemma. Automatically inputs without allowing user to type
  • Is there any way to access browser form field suggestions from JavaScript?
  • Get object from AWS S3 as a stream
  • Sony Xperia Z Tablet not found by adb
  • How to recover from a Spring Social ExpiredAuthorizationException
  • Cross-Platform Protobuf Serialization
  • DirectX11 ClearRenderTargetViewback with transparent buffer?
  • Validaiting emails with Net.Mail MailAddress
  • ILMerge & Keep Assembly Name
  • Hazelcast - OperationTimeoutException
  • Why is the timeout on a windows udp receive socket always 500ms longer than set by SO_RCVTIMEO?
  • Large data - storage and query
  • Web-crawler for facebook in python
  • Do I've to free mysql result after storing it?
  • WOWZA + RTMP + HTML5 Playback?
  • RestKit - RKRequestDelegate does not exist
  • Matrix multiplication with MKL
  • Unit Testing MVC Web Application in Visual Studio and Problem with QTAgent
  • Revoking OAuth Access Token Results in 404 Not Found
  • Getting error when using KSoap library to consume .NET web services