我正在尝试从我用 Objective-C 实现的客户端应用程序请求一个令牌。
我首先调用CreateEnvelopeFromTemplate
以获取一个信封ID。(它可以工作的文件)然后,我将此信封ID 传递给RequestRecipientToken
. 不幸的是,RequestRecipientToken向我返回Unspecified_Error 。我交叉检查了 RequestRecipientToken 的 SOAP 请求以及标头没有发现任何问题。
我已经复制了 SOAP 请求和响应以及这两种方法的标头。
**CreateEnvelopeFromTemplate Request**
{
"Content-Length" = 2725;
"Content-Type" = "application/soap+xml; charset=utf-8";
Host = "demo.docusign.net";
SOAPAction = "http://www.docusign.net/API/3.0/CreateEnvelopeFromTemplates";
"User-Agent" = wsdl2objc;
"X-DocuSign-Authentication" = "<DocuSignCredentials><Username>dubeynikhileshs@gmail.com</Username><Password>myPassword</Password><IntegratorKey>XORI-84155a30-597a-4821-918a-40551d71dcff</IntegratorKey></DocuSignCredentials>";
}
2013-08-03 21:24:06.619 DocuSignFramework-ObjC[2809:c07] OutputBody:
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:APIService="http://www.docusign.net/API/3.0" xsl:version="1.0">
<soap:Body>
<APIService:CreateEnvelopeFromTemplates>
<APIService:TemplateReferences>
<APIService:TemplateReference>
<APIService:TemplateLocation>Server</APIService:TemplateLocation>
<APIService:Template>5AB61121-DBEF-4403-BD2C-77B6E2E427F0</APIService:Template>
<APIService:RoleAssignments>
<APIService:RoleAssignment>
<APIService:RoleName>Signer</APIService:RoleName>
<APIService:RecipientID>1</APIService:RecipientID>
</APIService:RoleAssignment>
</APIService:RoleAssignments>
<APIService:FieldData>
<APIService:DataValues>
<APIService:DataValue>
<APIService:TabLabel>Full Name 1</APIService:TabLabel>
<APIService:Value>John Smith</APIService:Value>
</APIService:DataValue>
<APIService:DataValue>
<APIService:TabLabel>Company 3</APIService:TabLabel>
<APIService:Value>MyCompany</APIService:Value>
</APIService:DataValue>
</APIService:DataValues>
</APIService:FieldData>
</APIService:TemplateReference>
</APIService:TemplateReferences>
<APIService:Recipients>
<APIService:Recipient>
<APIService:ID>1</APIService:ID>
<APIService:UserName>John Smith</APIService:UserName>
<APIService:Email>johnSmith@mail.com</APIService:Email>
<APIService:Type>Signer</APIService:Type>
<APIService:CaptiveInfo>
<APIService:ClientUserId>1</APIService:ClientUserId>
</APIService:CaptiveInfo>
<APIService:RoutingOrder>1</APIService:RoutingOrder>
<APIService:RoleName>Signer</APIService:RoleName>
</APIService:Recipient>
</APIService:Recipients>
<APIService:EnvelopeInformation>
<APIService:AccountId>e3900d9b-1075-4d95-9d77-aecaddc38467</APIService:AccountId>
<APIService:EmailBlurb>This is my new eSignature service,it allows me to get your signoff without having to fax, scan, retype, refile and wait forever</APIService:EmailBlurb>
<APIService:Subject>Please Sign this NDA: John Smith</APIService:Subject>
</APIService:EnvelopeInformation>
<APIService:ActivateEnvelope>true</APIService:ActivateEnvelope>
</APIService:CreateEnvelopeFromTemplates>
</soap:Body>
</soap:Envelope>
2013-08-03 21:24:12.108 DocuSignFramework-ObjC[2809:c07] ResponseStatus: 200
2013-08-03 21:24:12.108 DocuSignFramework-ObjC[2809:c07] ResponseHeaders:
{
"Cache-Control" = "private, max-age=0";
"Content-Length" = 4108;
"Content-Type" = "application/soap+xml; charset=utf-8";
Date = "Sat, 03 Aug 2013 15:57:31 GMT";
"Strict-Transport-Security" = "max-age=7776000; includeSubDomains";
}
2013-08-03 21:24:12.109 DocuSignFramework-ObjC[2809:c07] ResponseBody:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/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"><env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"><wsa:Action>http://www.docusign.net/API/3.0/CreateEnvelopeFromTemplatesResponse</wsa:Action><wsa:MessageID>urn:uuid:0689b7a8-2206-44a2-a465-1cd448367289</wsa:MessageID><wsa:RelatesTo>urn:uuid:aba49813-2326-4f82-8b2b-9ff361c2ddbc</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp wsu:Id="Timestamp-3a57d1aa-53f7-489b-b442-85494b711036"><wsu:Created>2013-08-03T15:57:32Z</wsu:Created><wsu:Expires>2013-08-03T16:02:32Z</wsu:Expires></wsu:Timestamp></wsse:Security></env:Header><soap:Body><CreateEnvelopeFromTemplatesResponse xmlns="http://www.docusign.net/API/3.0"><CreateEnvelopeFromTemplatesResult><RecipientStatuses><RecipientStatus><Type>Signer</Type><Email>johnSmith@mail.com</Email><UserName>John Smith</UserName><RoutingOrder>1</RoutingOrder><Sent>2013-08-03T08:57:31.883</Sent><DeclineReason xsi:nil="true" /><Status>Sent</Status><RecipientIPAddress /><ClientUserId>1</ClientUserId><CustomFields /><TabStatuses><TabStatus><TabType>FullName</TabType><Status>Active</Status><XPosition>558</XPosition><YPosition>250</YPosition><TabLabel>Full Name 1</TabLabel><TabName>FullName</TabName><TabValue /></TabStatus><TabStatus><TabType>Custom</TabType><Status>Active</Status><XPosition>556</XPosition><YPosition>281</YPosition><TabLabel>Company 3</TabLabel><TabName>Company</TabName><TabValue>MyCompany</TabValue></TabStatus><TabStatus><TabType>Custom</TabType><Status>Active</Status><XPosition>558</XPosition><YPosition>320</YPosition><TabLabel>Data Field 5</TabLabel><TabName>Location</TabName><TabValue>Seattle</TabValue></TabStatus><TabStatus><TabType>DateSigned</TabType><Status>Active</Status><XPosition>556</XPosition><YPosition>362</YPosition><TabLabel>Date Signed 7</TabLabel><TabName>DateSigned</TabName><TabValue /></TabStatus><TabStatus><TabType>SignHere</TabType><Status>Active</Status><XPosition>375</XPosition><YPosition>1279</YPosition><TabLabel>Sign Here 6</TabLabel><TabName>SignHere</TabName><TabValue /></TabStatus><TabStatus><TabType>DateSigned</TabType><Status>Active</Status><XPosition>275</XPosition><YPosition>1435</YPosition><TabLabel>Date Signed 7</TabLabel><TabName>DateSigned</TabName><TabValue /></TabStatus></TabStatuses></RecipientStatus></RecipientStatuses><TimeGenerated>2013-08-03T08:57:32.1314114</TimeGenerated><EnvelopeID>536d4826-0797-47de-b502-daa02e6191de</EnvelopeID><Subject>Please Sign this NDA: John Smith</Subject><UserName>Nikhilesh Dubey</UserName><Email>dubeynikhileshs@gmail.com</Email><Status>Sent</Status><Created>2013-08-03T08:57:31.68</Created><Sent>2013-08-03T08:57:31.9130072</Sent><ACStatus>Original</ACStatus><ACStatusDate>2013-08-03T08:57:31.68</ACStatusDate><ACHolder>Nikhilesh Dubey</ACHolder><ACHolderEmail>dubeynikhileshs@gmail.com</ACHolderEmail><ACHolderLocation>DocuSign</ACHolderLocation><SigningLocation>Online</SigningLocation><SenderIPAddress>120.61.122.206 </SenderIPAddress><EnvelopePDFHash /><CustomFields><CustomField><Name>Envelope Field 1</Name><Show>False</Show><Required>False</Required><Value /></CustomField><CustomField><Name>Envelope Field 2</Name><Show>False</Show><Required>False</Required><Value /></CustomField><CustomField><Name>SendingAppVersion</Name><Show>False</Show><Required>False</Required><Value>Version=7.5.7600.16385 (win7_rtm.090713-1255);AppExe=w3wp.exe</Value></CustomField></CustomFields><AutoNavigation>true</AutoNavigation><EnvelopeIdStamping>true</EnvelopeIdStamping><AuthoritativeCopy>false</AuthoritativeCopy></CreateEnvelopeFromTemplatesResult></CreateEnvelopeFromTemplatesResponse></soap:Body></soap:Envelope>
2013-08-03 21:24:13.439 DocuSignFramework-ObjC[2809:c07] respone <APIServiceSoap12BindingResponse: 0x7c87190>
bodyParts (
"<APIService_CreateEnvelopeFromTemplatesResponse: 0x7b7bcb0>"
)
2013-08-03 21:24:13.440 DocuSignFramework-ObjC[2809:c07] response.CreateEnvelopeFromTemplatesResult.EnvelopeID 536d4826-0797-47de-b502-daa02e6191de
**RequestRecipientToken**
2013-08-03 21:24:13.442 DocuSignFramework-ObjC[2809:c07] OutputHeaders:
{
"Content-Length" = 1773;
"Content-Type" = "application/soap+xml; charset=utf-8";
Host = "demo.docusign.net";
SOAPAction = "http://www.docusign.net/API/3.0/RequestRecipientToken";
"User-Agent" = wsdl2objc;
"X-DocuSign-Authentication" = "<DocuSignCredentials><Username>dubeynikhileshs@gmail.com</Username><Password>myPassword</Password><IntegratorKey>XORI-84155a30-597a-4821-918a-40551d71dcff</IntegratorKey></DocuSignCredentials>";
}
2013-08-03 21:24:13.443 DocuSignFramework-ObjC[2809:c07] OutputBody:
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:APIService="http://www.docusign.net/API/3.0" xsl:version="1.0">
<soap:Body>
<APIService:RequestRecipientToken>
<APIService:EnvelopeID>536d4826-0797-47de-b502-daa02e6191de</APIService:EnvelopeID>
<APIService:ClientUserID>1</APIService:ClientUserID>
<APIService:Username>John Smith</APIService:Username>
<APIService:Email>johnSmith@mail.com</APIService:Email>
<APIService:AuthenticationAssertion>
<APIService:AssertionID>Your AssertionID Here</APIService:AssertionID>
<APIService:AuthenticationInstant>2013-08-03T15:54:13Z</APIService:AuthenticationInstant>
<APIService:AuthenticationMethod>Password</APIService:AuthenticationMethod>
<APIService:SecurityDomain>YourApp.com</APIService:SecurityDomain>
</APIService:AuthenticationAssertion>
<APIService:ClientURLs>
<APIService:OnSigningComplete>http://www.google.com</APIService:OnSigningComplete>
<APIService:OnViewingComplete>http://www.google.com</APIService:OnViewingComplete>
<APIService:OnCancel>http://www.google.com</APIService:OnCancel>
<APIService:OnDecline>http://www.google.com</APIService:OnDecline>
<APIService:OnSessionTimeout>http://www.google.com</APIService:OnSessionTimeout>
<APIService:OnException>http://www.google.com</APIService:OnException>
<APIService:OnIdCheckFailed>http://www.google.com</APIService:OnIdCheckFailed>
</APIService:ClientURLs>
</APIService:RequestRecipientToken>
</soap:Body>
</soap:Envelope>
2013-08-03 21:24:16.003 DocuSignFramework-ObjC[2809:c07] ResponseStatus: 500
2013-08-03 21:24:16.003 DocuSignFramework-ObjC[2809:c07] ResponseHeaders:
{
"Cache-Control" = private;
"Content-Length" = 1475;
"Content-Type" = "application/soap+xml; charset=utf-8";
Date = "Sat, 03 Aug 2013 15:57:38 GMT";
"Strict-Transport-Security" = "max-age=7776000; includeSubDomains";
}
2013-08-03 21:24:16.004 DocuSignFramework-ObjC[2809:c07] ResponseBody:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/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"><env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"><wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action><wsa:MessageID>urn:uuid:1688ead3-d6c4-4fff-9e41-8732160db9ce</wsa:MessageID><wsa:RelatesTo>urn:uuid:c5fe47b4-fc7f-47a3-855b-0b2d6435bd32</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp wsu:Id="Timestamp-ff87b1c1-2ce2-43e6-8ccb-99e71bb2f8ac"><wsu:Created>2013-08-03T15:57:38Z</wsu:Created><wsu:Expires>2013-08-03T16:02:38Z</wsu:Expires></wsu:Timestamp></wsse:Security></env:Header><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:lang="en">Unspecified_Error</soap:Text></soap:Reason><soap:Node>https://demo.docusign.net/api/3.0/dsapi.asmx</soap:Node><detail><ErrorCode xmlns="missing in Web.Config">1</ErrorCode><ErrorReason xmlns="missing in Web.Config">An Error Occurred.</ErrorReason></detail></soap:Fault></soap:Body></soap:Envelope>
namespace error : xmlns: 'missing in Web.Config' is not a valid URI
t/api/3.0/dsapi.asmx</soap:Node><detail><ErrorCode xmlns="missing in Web.Config"
^
namespace error : xmlns: 'missing in Web.Config' is not a valid URI
="missing in Web.Config">1</ErrorCode><ErrorReason xmlns="missing in Web.Config"