benaic | Posts: 3

callback listener

0 votes
Hello, I'm trying to figure out how to program a page on my IIS server to handle event notifications. My research has turned up various topics and code snippets (jQuery, VB.NET, C#, java servlet, cross-domain, etc) but I'm not sure how to put it all together in order to simply receive ("get") the posted json payload from esign. Any suggestions would be greatly appreciated.

harishaidary | Posts: 1812

Reply to: callback listener

0 votes
Hey, I'm not quite sure if you are asking about how a callback listener works or if you are asking about the json payload sent by esignlive looks like but here's an example in python uploaded on our Developer Community Code Share that shows both: https://developer.esignlive.com/code-share/e-sl-event-integration-google-app-engine/

harishaidary | Posts: 1812

Reply to: callback listener

0 votes
You can also have a look at this C# example on stackoverflow. Using HttpListener, you can parse the json sent by esignlive http://stackoverflow.com/questions/19031438/parse-post-parameters-from-httplistener

benaic | Posts: 3

Reply to: callback listener

0 votes
Thank you for the suggestions. I was able to create a C# ASP.NET Web API web app in Visual Studio with the following code: ____________________________________________ [root]\index.aspx.cs: ____________________________________________ namespace EsignCallbackListener { public partial class index : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } [WebMethod] public static void LogEslEvent(EsignEvent eslData) { string str = "eslData.PackageID: " + eslData.PackageID; str += "
eslData.Message: " + eslData.Message; str += "
eslData.DocumentID: " + eslData.DocumentID; // log and/or email the data... } } } ____________________________________________ [root]\Model\EsignEvent.cs: ____________________________________________ namespace EsignCallbackListener.Model { public class EsignEvent { public string EventName { get; set; } public string SessionUser { get; set; } public string PackageID { get; set; } public string Message { get; set; } public string DocumentID { get; set; } } } ____________________________________________ [root]\web.config ____________________________________________ In another localhost web project I have this sample code: form.html: When I submit/post from my local IIS form.html to our production public web server (http://esign.svr.com/index.aspx/LogEslEvent) it works. I went to https://sandbox.e-signlive.com/account and set the Callback URL to http://esign.svr.com/index.aspx/LogEslEvent. However, when I create a test package interactively in the sandbox I receive the following email: Subject: e-SignLive Callback failed. Body: Failed to communicate with the callback server. URL: http://esign.svr.com/index.aspx/LogEslEvent Payload: {"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"PACKAGE_CREATE","sessionUser":"27Wy8TKVeo7V","packageId":"b64fd729-27f6-4584-a75f-856f4ee7bec5","message":null,"documentId":null}

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off