cdean

Legacy Documentation for OneSpan version 6.2

0 votes

Where may I find documentation, code share, etc. for OneSpan version 6.2?

Thank you,

~Clayton


Reply to: Legacy Documentation for OneSpan version 6.2

0 votes

Hi Clayton,

 

Here's the 6.2 On-Premises Deployment Guide, if you need any other specific guide, I will send them to the email that you registered in the forum.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to:

0 votes

Thank you Duo_Liang

I am looking for developer documentation that shows similar usage as CodeShare for this version.
The code I wrote works on the sandbox.esign server but I need use an older version of the eSign server.  
I want to make sure the calls I am making are "backward compatible" or if I need to change my implementation.

When I run the .NET SDK and REST API eSign code on the sandbox everything works.
The same code hangs when I try to run on our older eSign server.
 

Thank you,

~Clayton


Reply to: Legacy Documentation for OneSpan version 6.2

0 votes

Hi Clayton,

 

In terms of the SDK, it should be designed and tested in forward compatible manner where you don't always have to upgrade SDK everytime a new release comes up. On the other hand, if you are developing with older server version (say 6.2, which equals to 11.15 SaaS version), it might be better if you use the same SDK version as the system, to avoid invoking new SDK functions/API endpoints introduced after 11.15, and the SDK modelling fits the API modelling better.

.NET SDK, in particular, is a bit tricky that we've moved to a new Git repository and hosted the project back to NuGet since 11.31. Some class and space names were rebranded from "esl" to "onespan", which could cause code changes at your end. I've also attached the 11.15 .NET SDK if you preferred to give it a try.

 

For REST API code, I can try to help you find an older version swagger file and in the meantime, since you have more flexible error tracing capability for your custom code, it would be obvious if there's any exception thrown by this part of code.

 

If switching to 11.15 SDK doesn't solve the problem, could you clarify a bit more on the nature of the issue?

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments

Reply to: Legacy Documentation for OneSpan version 6.2

0 votes

Thank you, Duo_Liang

This should work.
I agree with you that the SDK is a bit tricky.

I've started using the REST API as it appears to work better regardless of version.
One issue I have with the REST API is that I need to convert JSON objects to Document Packages, etc. depending on the Response payload I'm trying to retrieve.
I don't want to really create models on my end to deserialize these objects.
The SDK is easier to use but is not as reliable as I get exceptions depending on the version I've used versus the version of the server I'm retrieving from.

Thanks for your help.
I'll let you know how 11.15 does....
FYI, I am now retrieving from an on-prem eSign server with version 7.2 that was just brought online today. :)

Thank you,

~Clayton


Reply to:

0 votes

Whether I use 11.12 or 11.15 SDK on eSign server version 6.2 or 7.2 respectively, they both return the following exception when trying to draft a package OR any eSign SDK call:

15:29:47.382: Silanis.ESL.SDK.EslServerException: Could not upload documents to package.
                                                                      Exception: The remote server returned an error: (400) Bad Request.
                                                                      HTTP POST on URI https://<new 7.2 eSign on-prem server>/a/packages/WPq_qYyxLacEdaN_U8ifG9f-MLQ=/documents.
Optional details: 
System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at Silanis.ESL.SDK.Internal.HttpMethods.MultipartPostHttp(String apiToken, String path, Byte[] content, String boundary, AuthHeaderGenerator authHeaderGen)

Here is the code snippet of interest prior to the exception:

DocumentPackage draftDocumentPackage = PackageBuilder
                .NewPackageNamed(Path.GetFileNameWithoutExtension(pdfFile))
                .WithSigner(SignerBuilder
                            .NewSignerWithEmail(drow["_EmailAddress"])
                            .WithFirstName(drow["_FirstName"])
                            .WithLastName(drow["_LastName"]))
                .WithDocument(DocumentBuilder
                            .NewDocumentNamed(Path.GetFileNameWithoutExtension(pdfFile))
                            .WithId(drow["DocID"])
                            .WithDescription("Document with applied layout description.")
                            .FromFile(pdfFile))
                .Build();

                try {
                    PackageId draftPackageId = OneSpanClient.CreatePackage(draftDocumentPackage);  <--- exception thrown here
                 }
                catch (EslServerException ex) {
                    throw new EslServerException($"{ex.Message}", {ex.ServerError}, {ex});
                }

Thank you,

~Clayton


Reply to:

0 votes

FYI, I also tested the REST API sample code to create a draft package on both our 7.2 on-prem eSign server and the OneSpan eSign sandbox server.
Without any changes, the 7.2 returns bad request while the sandbox creates the draft package and returns a package id.

Thank you,

~Clayton


Reply to: Legacy Documentation for OneSpan version 6.2

0 votes

Hi Clayton,

 

Looks like it failed when uploading document:

POST /api/packages/WPq_qYyxLacEdaN_U8ifG9f-MLQ=/documents

Can you have a quick try changing the function .CreatePackage() to .CreatePackageOneStep(), which sends the JSON and the byte array in a single API?

 

Duo

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to:

0 votes

Using our on-prem 7.2 server URL and changing the code as you suggested resulted in the following error:

Silanis.ESL.SDK.EslServerException: Could not create a new package one step. Exception: The remote server returned an error: (400) Bad Request. 

It appears there were no change to the outcome using the OneStep call.

Thank you,

~Clayton


Reply to: Legacy Documentation for OneSpan version 6.2

0 votes

Ok, I am able to create a draft package via the REST API in eSign 7.2 on-prem server.
However, it now fails to apply the successfully retrieved layout with the following error:

Silanis.ESL.SDK.EslServerException while in ApplyLayouts.
(Silanis.ESL.SDK.EslServerException: Could not apply layout.
Exception: The remote server returned an error: (403) Forbidden.

I have my own account and the account settings allow layouts (see attached PNG).

Here is my minimal, programatically validated Package JSON Schema used to create the draft package:

  "roles": [
    {
      "id": "Signer",
      "signers": [
        {
          "email": "_EmailAddress",
          "firstName": "_FirstName",
          "lastName": "_LastName"
        }
      ]
    }
  ],
  "documents": [
    {
      "approvals": [
        {
          "role": "Signer"
        }
      ],
      "name": "_DocumentName"
    }
  ],
  "name": "_PackageName",
  "type": "PACKAGE",
  "language": "en",
  "description": "Package with _Layout Layout Applied",
  "visibility": "ACCOUNT",
  "status": "SENT"
}

I replace all underscored values with string data from our database, validate the string JSON, create the json StringContent then apply this to the POST API call.
The draft package is created fine with this.

I then retrieve the previously created and tested layout from eSign without any issues.

But when I go to apply the layout to the PackageId, I get the (403) Forbidden error. 
Why won't the Layout get applied to the package using the ESL SDK call, OneSpanClient.LayoutService.ApplyLayout(packageId, DocID, layoutId)?

Thank you,

~Clayton


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