繁体   English   中英

#DocuSignAPI:使用SOAP UI登录DocuSign

[英]#DocuSignAPI: DocuSign Login using SOAP UI

我在SOAP UI中使用DocuSign API WSDL并尝试调用方法,但收到错误User_Authentication_Failed-缺少身份验证标头

在某些帖子中看到,需要使用安全令牌,但不必在docusign中获取安全令牌,而是使用Integrator密钥值。

如果有人可以在这里提供指导,请。

我的SOAP UI请求是:

<soapenv:Envelope xmlns:ns="http://www.docusign.net/API/3.0" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
<soapenv:Header>
  <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
     <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 
        <wsse:Username>haider@abcd.com</wsse:Username> 
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">HR123456</wsse:Password> 
        <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">iJwabpA/2j2ooh7deCAVcg==</wsse:Nonce>
        <wsu:Created>2014-07-24T17:46:39.991Z</wsu:Created>
     </wsse:UsernameToken> 
     <wsu:Timestamp wsu:Id="Timestamp-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 
        <wsu:Created>2014-07-24T17:46:19.730Z</wsu:Created> 
        <wsu:Expires>2014-07-24T17:56:19.730Z</wsu:Expires> 
     </wsu:Timestamp> 
  </wsse:Security> 
</soapenv:Header> 
<soapenv:Body> 
<ns:RequestPDF> 
<!--Optional:--> 
<ns:EnvelopeID>01f90b51-7cf4 -48a1-8946-2795fc970b77</ns:EnvelopeID> 
</ns:RequestPDF>
</soapenv:Body> 
</soapenv:Envelope>

得到的响应为:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 
<soap:Header>
  <wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action> 
  <wsa:MessageID>urn:uuid:6e9fbf02-7c18-4d65-bbfc-f828cf51bb57</wsa:MessageID> 
  <wsa:RelatesTo>urn:uuid:7e7b4a69-834f-4906-9b92-a16cc8f6d32b</wsa:RelatesTo> 
  <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To> 
  <wsse:Security> 
     <wsu:Timestamp wsu:Id="Timestamp-659010d2-c16b-479a-ae43-169846a7898c"> 
        <wsu:Created>2014-07-24T17:47:54Z</wsu:Created> 
        <wsu:Expires>2014-07-24T17:52:54Z</wsu:Expires> 
     </wsu:Timestamp> 
  </wsse:Security> 
</soap:Header> 
<soap:Body>  
<soap:Fault> 
     <faultcode>soap:Server</faultcode> 
     <faultstring>User_Authentication_Failed - Missing authentication header</faultstring> 
     <detail/> 
  </soap:Fault> 
</soap:Body> 
</soap:Envelope> 

以下文档可能是使用身份验证标头和端点URL的更好概述:

https://www.docusign.com/p/APIGuide/APIGuide.htm#Introduction+Changes/Authentication.htm%3FTocPath%3DAuthentication%7C_____0

以下还以“代表发送”概述了上述内容:

https://www.docusign.com/p/APIGuide/APIGuide.htm#Introduction+Changes/代表功能发送.htm%3FTocPath%3DAuthentication%7C _____ 2

由于您选择的标头类型还决定了应使用的端点URL,因此以下是演示环境的示例:

HTTP = https://demo.docusign.net/api/3.0/dsapi.asmx

SOAP = https://demo.docusign.net/api/3.0/api.asmx

因为您正在使用SOAP,所以正确的端点将是api.asmx

在SOAP UI中,您可以:

您还需要在身份验证内添加您的集成商密钥。 积分键也应始终放在方括号“ []”中。我的示例如下:

<soap:Header>
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1">
        <wsse:UsernameToken wsu:Id="UsernameToken-1">
            <wsse:Username>[INTEGRATOR KEY]DS USERNAME</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">[PASSWORD]</wsse:Password>
        </wsse:UsernameToken>
    </wsse:Security>
</soap:Header>

在SOAP UI中,您将添加请求的标头和值。 选择页面页脚的标题按钮,然后选择添加。 您将在此处添加身份验证标头。

在此处输入图片说明

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM