Skip Navigation LinksProducts > ADSS Client SDK > Code Samples

ADSS Client SDK Code Samples

Signing

  • Sign PDF

    This sample demonstrates how to get a PDF signed using an ADSS Server profile adss:signing:profile:001. This example creates a visible signature on the first page of the PDF at the top left corner. Note that the business application can also override the profile attributes in the code and set signing reason, signing location etc. The input and output file path and ADSS Server name are configurable and taken as command line parameters. The sample uses the ADSS Client API’s XML mode to communicate with ADSS Signing Service. To achieve optimum performance you can also utilize pure HTTP mode instead of XML mode for all signing interface requests. To do so, you just need to call setRequestMode(SigningRequest.HTTP) function of signing API and rest of the code would remain unchanged. Java | C#

  • Sign PDF Using DSS

    This sample demonstrates how to get a PDF signed using DSS protocol by ADSS Server profile adss:signing:profile:001. This example creates a visible signature on the first page of the PDF at the top left corner. Note that the business application can also override the profile attributes in the code and set signing reason, signing location etc. The input and output file path and ADSS Server name are configurable and taken as command line parameters. The sample uses the ADSS Client API’s DSS mode to communicate with ADSS Signing Service. Java | C#

  • Sign PDF Using HTTP

    This sample demonstrates how to get a PDF signed using an ADSS Server profile adss:signing:profile:001 via a pure HTTP POST request without using ADSS Client API Signing classes. This example creates a visible signature on the first page of the PDF at the top left corner. Note that the business application can also override the profile attributes in the code and set signing reason, signing location etc. The input and output file path and ADSS Server name are configurable and taken as command line parameters. Java | C#

  • Sign PDF Using Preferences

    This sample demonstrates how an application can send a PDF file to an ADSS Server and have it signed using the XML signature appearance preferences set within the ADSS Server signing policy. XML preferences enable signatures to be created on multiple pages¸ in custom locations and with custom appearances. In this example all pages are signed. The location of the signature is defined to be slightly left of centre. The ADSS Server signing profile used in the sample is adss:signing:profile:001. See the ADSS Server Admin Guide to find out more about the capabilities of XML preferences and how to configure them. The input and output PDF file path and ADSS Server name are configurable and taken as command line parameters. Java | C#

  • Hash And Assembly Manager

    This sample demonstrates how an application can send a PDF to an ADSS Server and have it signed by a generated user key. In this example the ADSS signing profile adss:signing:profile:001 will be used, although in this case the ADSS Server will not sign the PDF, rather it creates an empty signature field and returns a hash of the PDF document. The sample then generates a key-pair and a self signed certificate, signs the hash using this key, generates and sends a PKCS#7 back to ADSS for assembly. The input and output PDF file path and ADSS server name are configurable and taken as command line parameters. Java | C#

  • Create Empty Signature Fields

    This sample demonstrates how to get ADSS Server to generate empty signature fields on the top left corner of all the pages of a PDF. It then also demonstrates a request for ADSS Server to sign one of the generated blank signature fields using the ADSS profile adss:signing:profile:003. The signature is a visible signature created on the first page of the PDF at the top left corner position - created using ADSS profile adss:signing:profile:001. Note that the business application can also override the signing profile attributes in the code and set signing reason, signing location etc. The input and output PDF file path and ADSS server name are configurable and taken as command line parameters. Java | C#

Verification

  • Verify PDF

    This sample demonstrates how an application can send a signed PDF to an ADSS Server and have the embedded signatures verified. The input PDF file path and ADSS server name are configurable and taken as command line parameters. Java | C#

  • Verify PDF Using DSS

    This sample demonstrates how an application can send a signed PDF to an ADSS Server and have the embedded signatures verified using DSS interface. The input PDF file path and ADSS server name are configurable and taken as command line parameters. Java | C#

  • Verify XML Enveloped

    This sample demonstrates how an application can send a signed XML file to an ADSS Server and have the embedded signatures verified. The input XML file path and ADSS server name are configurable and taken as command line parameters. The XML must only have one signature. Java | C#

  • Verify PKCS7

    This sample demonstrates how an application can send a PKCS#7 signed object to an ADSS Server and have its signature verified. The input PKCS#7 file and ADSS server name are configurable and taken as command line parameters. The PKCS#7 must only have one signature. CMS signatures can also be sent using this sample. Java | C#

  • Verify Certificate

    This sample demonstrates how an application can send an X509 certificate to an ADSS server and have the certificate validated and its trust checked. The input certificate file and ADSS server name are configurable and taken as command line parameters. Java | C#

  • Historical Verification

    Similar program samples to those above are present inside java\src\com\ascertia\adss\samples\verification\historical. These perform historical verification and validation. In these samples the signature and certificate is verified and validated at a date/time in the past. Java | C#

Certification

  • Generate Certificate

    This sample demonstrates how an application can send a Certification request to an ADSS Server and receive the PKCS#12, Certificate, PKCS#7 etc. The ADSS server name is configurable and taken as command line parameter. Java | C#

    XKMS

    • XKMS Validate

      This sample demonstrate how ADSS Client SDK can be used to compose and send a certificate validation request to ADSS Server. Java | C#

      LTANS

      • LTAN Archive

        This sample demonstrates how a document can be securely archived at ADSS Server for a long period. ADSS Client SDK uses LTANS archive command to store the document at server. This program takes input document path as command line parameter and returns the reference Id of the stored archive object. Java | C#

      • LTAN Export

        This sample demonstrates how an archived document can be exported out of ADSS Server database through LTANS export command. This program takes exported file path and reference Id of stored archive as command line parameters. Java | C#

      • LTAN Delete

        This sample demonstrates how an archived document can be deleted from ADSS Server database through LTANS delete command. This program takes reference Id of stored archive as command line parameters. Java | C#

      Popular Keywords:

      Copyright © 2002-2011 Ascertia. All rights reserved.

      Company | Privacy Statement | Contact Us

      Ascertia is a global provider of Digital Signature products and solutions that enable trust within electronic workflows. Organisations can now safely cross the final hurdle in migrating old paper-intensive approval processes to the new secure digital world. Ascertia’s Digital Signing products are designed to be easy to integrate and use in a range of business scenarios.