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:33amReply 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