Simulating REST workflow using SOAPUI
Monday, April 11, 2016 at 09:19amHi,
thanks Haris for your input, my next step is to simulate the workflow and working on a POC using SOAPUI ( a freeware I use to test REST services ).
The workflow is straight forward:
1. Create a Package and Send the PDF . Read the Response PackageId
2. Retrieve the SIgningURL based on the PackageId
I haven't had any luck with this simple call #1. Can you tell me what I am missing?
In SoapUI I've create a new REST Project pointing to the URI https://sandbox.e-signlive.com/api/packages/ (Attached Screenshot of the Tool with the config)
The JSON I'm sending is based on the sample I edited ( based on the Blog How to Create and Send your first package by Michael) - See the full string below submitted as a parameter "payload"
The PDF is a sample PDF with some controls to show where the Signature should appear. (Attached)
I'm using my apiKey ( edited out of this sample for obvious reasons)
This is the request ( RAW) and response I am getting.
REQUEST - where Authorization is the parameter I'm sending in the Header = "NxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxA==" ( which comes from the apiKey from my Account in the Developer Account)
POST https://sandbox.e-signlive.com/api/packages/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/form-data; boundary="----=_Part_7_1054765195.1460397781533"
MIME-Version: 1.0
Authorization: NxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxA==
Content-Length: 27678
Host: sandbox.e-signlive.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
RESPONSE:
HTTP/1.1 401 Unauthorized
Server: nginx
Date: Mon, 11 Apr 2016 18:03:30 GMT
Content-Type: application/json
Content-Length: 165
Connection: keep-alive
X-Powered-By: Undertow 1
{"technical":null,"entity":null,"packageId":null,"messageKey":"error.unauthorised.noSession","message":"Failed to retrieve Session","code":401,"name":"Unauthorized"}
The payload is the following ( I changed the emails of the 2 signers):
{"roles":[{"locked":false,"emailMessage":{"content":"JSON Sample email"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"Id: SIgner 1 CW","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"Technicost Inc","firstName":"CYRIL","lastName":"W.","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"Lead Architect","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":true,"provider":false,"download":true},"group":null,"signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"SenderName - CYRIL"},{"locked":false,"emailMessage":{"content":""},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"id: Signer2 LW","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"","firstName":"SIGNER 2 FNAME","lastName":"SIGNER_LAST_NAME 2","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":false,"provider":false,"download":false},"group":null,"id":"Signer","signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"Signer"}],"documents":[{"approvals":[{"role":"Signer","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":175,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""},{"role":"Sender","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":550,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""}],"name":"YOUR_FILE_NAME"}],"name":"Test Package REST","type":"PACKAGE","language":"en","emailMessage":"","description":"New Package","autoComplete":true,"status":"SENT"}
I've attached the screenshot of the SOAPUI set up.
Can you tell me what I am missing?
Thanks
Reply to: Simulating REST workflow using SOAPUI
Thursday, April 14, 2016 at 08:35amReply to: Simulating REST workflow using SOAPUI
Monday, April 11, 2016 at 10:38amReply to: Simulating REST workflow using SOAPUI
Monday, April 11, 2016 at 11:15amReply to: Simulating REST workflow using SOAPUI
Monday, April 11, 2016 at 11:27amReply to: Simulating REST workflow using SOAPUI
Tuesday, April 12, 2016 at 04:48amReply to: Simulating REST workflow using SOAPUI
Tuesday, April 12, 2016 at 05:10amReply to: Simulating REST workflow using SOAPUI
Tuesday, April 12, 2016 at 07:14amReply to: Simulating REST workflow using SOAPUI
Thursday, April 14, 2016 at 06:33am{"settings":{"ceremony":{"events":{"complete":{"dialog":true,"redirect":"https://www.google.ca/search?q=beaches&biw=1680&bih=905&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwist6LBp47MAhXmkoMKHfrpB3wQsAQIOQ"}},"inPerson":true,"declineButton":true,"declineReasons":["Reason 1","Reason 2","No Reason"],"disableDeclineOther":false,"disableDownloadForUncompletedPackage":false,"disableFirstInPersonAffidavit":true,"disableInPersonAffidavit":false,"disableOptOutOther":false,"disableSecondInPersonAffidavit":true,"documentToolbarOptions":{"downloadButton":true},"handOver":{"title":"You will be redirected to Google homepage","href":"http://www.google.com","text":"Exit to site"},"hideCaptureText":false,"hideLanguageDropdown":true,"hidePackageOwnerInPerson":true,"hideWatermark":true,"maxAuthFailsAllowed":3,"optOutButton":true,"optOutReasons":["Reason 1","Reason 2"],"style":null,"layout":{"footer":{},"iframe":true,"navigator":true,"brandingBar":{"logo":{"src":"http://www.logo-maker.net/images/common/company-logo8.gif","link":""}},"header":{"feedback":true,"globalActions":{"confirm":true,"download":false,"hideEvidenceSummary":false,"saveAsLayout":false},"titleBar":{"title":true,"progressBar":true},"breadcrumbs":false,"globalNavigation":false,"sessionBar":true}}}},"roles":[{"locked":false,"emailMessage":{"content":"roles1.emailMessage.content 1 JSON Sample email"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"Signer1","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"Technicost Inc","firstName":"Roles.Signer 1 FName","lastName":"W.","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"Lead Architect","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":true,"provider":false,"download":true},"group":null,"signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"roles1.name – CYRIL"},{"locked":false,"emailMessage":{"content":"roles2.emailMessage.content 2"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"SignerId2","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"","firstName":"SIGNER2 First Name","lastName":"Signer 2 Last Name","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":false,"provider":false,"download":false},"group":null,"id":"SignerId2","signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"Role.Signer 2 Name"}],"documents":[{"approvals":[],"extract":true,"name":"ESLDocumentWithFormFieldsWithTwoSignatures"}],"name":"root Package Name","type":"PACKAGE","language":"en","emailMessage":"","description":"root description","autoComplete":true,"status":"SENT"}The Response is: The PDF is Attached: Besides the 2 Signature Fields, I have some other Text Fields I've added as a test to see if I can have Text Fields for editing when it is being submitted at Signature Ceremony. I'd like to see if I can capture last minute input and then save the results back to my Application , is this possible? Would you mind taking a look at the PDF and JSON , and point out what I am doing wrong?Reply to: Simulating REST workflow using SOAPUI
Tuesday, August 9, 2016 at 02:41pmReply to: Simulating REST workflow using SOAPUI
Wednesday, August 10, 2016 at 06:27amReply to: Simulating REST workflow using SOAPUI
Monday, August 15, 2016 at 07:12amReply to: Simulating REST workflow using SOAPUI
Tuesday, August 16, 2016 at 06:00am