Getting certificate data to insert a seal/signature

Web service method GetCertificate serves the calling applications to get certificate data and help prepare the space to insert signature/seal data, e.g. in PDF data or XML file.

Availability of this method in the web definition depends on the version of SecuSign SDK web service.

Method name: GetCertificate

Service description including WSDL schema and an example request and response for SOAP 1.1 and SOAP 1.2 are located at https://localhost/secusign/default.asmx?op=GetCertificate.

Localhost is the name used for the local computer; write the SDK server name/IP address instead (according to the settings in IIS).

Request in SOAP 1.1 interface

POST /secusign/default.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://software602.com/secusign/GetCertificate"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetCertificate xmlns="http://software602.com/secusign/">
      <CertificateID>string</CertificateID>
      <Params>string</Params>
    </GetCertificate>
  </soap:Body>
</soap:Envelope>

Input parameters of the method

<CertificateID>

[mandatory element]

Input Description

String

Identification of the certificate whose data to get and prepare inserting an advanced/qualified electronic seal or an advanced/qualified electronic signature.

For in-house SecuSign SDK interface, the following formats can be used:

  • HStore: [alias]

    • Alias of the signing/sealing certificate from the HSM module of the Remote signing/sealing service.

    • If configuration key Seal_DefaultToQStore is specified in the web service configuration, the HStore prefix is not used.

  • Empty string

    • If the web service configuration contains the configuration key Seal_DefaultToQStore, the default certificate from the Remote sealing service will be used.

Default value: empty string.

<Params>

[optional element]

Input Description

String

Optional, currently not in use.

Response structure

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetCertificateResponse xmlns="http://software602.com/secusign/">
      <GetCertificateResult>int</GetCertificateResult>
      <X509Certificate>base64Binary</X509Certificate>
      <StatusMessage>string</StatusMessage>
    </GetCertificateResponse>
  </soap:Body>
</soap:Envelope>

Output parameters of the method

<GetCertificateResult>

Return value Description

Int

Result of the GetCertificate method (getting certificate data). 0 = OK, otherwise see Return codes of all methods and error described in StatusMessage.

<X509Certificate>

Return value Description

Base64Binary

Base64 data of the certificate in X509 format.

<StatusMessage>

Return value Description

String

Text statement corresponding to the overall result of getting certificate data. The value is only filled if the result is complicated.