The Preserve_register method
Allows the qualified SecuSign service to preserve electronic signatures in a document provided with a recognized, qualified, or advanced electronic signature, seal and/or qualified electronic time stamp. During registration, the document is provided with a qualified electronic time stamp to unambiguously determine the time when the service registered the document.
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=Preserve_register.
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/Preserve_register"
<?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>
<Preserve_register xmlns="http://software602.com/secusign/">
<FileName>string</FileName>
<FileData>base64Binary</FileData>
<FileType>UNKNOWN or CMSPKCS7 or CMSPKCS7Ext or PDF or XML or XML602FORM or XMLISDOC or ASiC_S_CAdES or ASiC_S_XAdES or ASiC_S_Tst or ASiC_E_CAdES_Tst or ASiC_E_XAdES or MS_WORD or MS_EXCEL or MS_PWR_PNT or ODF</FileType>
<ExternalSignatureFileName>string</ExternalSignatureFileName>
<ExternalSignature>base64Binary</ExternalSignature>
<SigValidityCondition>ALL or AT_LEAST_ONE or LAST</SigValidityCondition>
<Properties>
<AddTimeStampIfNeeded>boolean</AddTimeStampIfNeeded>
</Properties>
<SortInfo>string</SortInfo>
<UserComment>string</UserComment>
<Params>string</Params>
</Preserve_register>
</soap:Body>
</soap:Envelope>
Input parameters of the method
<FileName>
[mandatory element]
Input | Description |
---|---|
String |
Name of input file (including extension) to be preserved. Example: Document.pdf. Max. 260 characters. |
<FileType>
[mandatory element]
Input | Description |
---|---|
UNKNOWN |
Unknown document type. |
CMSPKCS7 |
Document signed with an internal CMS/PKCS7 signature, e.g., Data messages from the Data Mailbox Information System. |
CMSPKCS7Ext |
Document signed with an external CMS/PKCS7 signature, e.g., Data messages from the Data Mailbox Information System. |
PDF document. |
|
XML |
XML data. |
XML602FORM |
FO/ZFO forms for Software602 Form Filler. |
XMLISDOC |
Signed XML ISDOC data. |
ASiC_S_CAdES |
ASiC-Simple with CAdES signature. |
ASiC_S_XAdES |
ASiC-Simple with XAdES signature. |
ASiC_S_Tst |
ASiC-Simple with a Timestamp. |
ASiC_E_CAdES_Tst |
ASiC-Extended with CAdES signature or Timestamp. |
ASiC_E_XAdES |
ASiC-Extended with XAdES signature. |
MS_WORD |
MS Word document. |
MS_EXCEL |
MS Excel document. |
MS_PWR_PNT |
MS PowerPoint document. |
ODF |
OpenDocumentFormat (OpenOffice). |
<ExternalSignatureFileName>
[optional element]
Input | Description |
---|---|
string |
External signature file name (including extension). Only if such a signature has been created for the document. |
<ExternalSignature>
[optional element]
Input | Description |
---|---|
Base64Binary |
External signature data encoded in Base64. Only if such a signature has been created for the document. |
<SigValidityCondition>
[mandatory element]
Input | Description |
---|---|
String |
Signature validity conditions. Values:
Validable means valid or revoked. A situation in which the certificate validity cannot be unambiguously determined is not accepted. |
<Properties>
<AddTimestampIfNeeded>
[optional element]
Input | Description |
---|---|
Boolean |
It will try to preserve the signed file, which is without a stamp (BaseLine-B). If the signature is otherwise valid, a stamp is added, and the document is registered for preservation. Otherwise, an error is returned stating that the file could not be preserved. |
</Properties>
<SortInfo>
[optional element]
Input | Description |
---|---|
String |
Sorting details – e.g., folder name or structure of nested folders in which the document is registered with the user. Max. 100 characters. |
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>
<Preserve_registerResponse xmlns="http://software602.com/secusign/">
<Preserve_registerResult>int</Preserve_registerResult>
<OutputData>base64Binary</OutputData>
<PreservationInfo>
<CreationDateTime>dateTime</CreationDateTime>
<docId>string</docId>
<fileName>string</fileName>
<fileSize>long</fileSize>
<sortInfo>string</sortInfo>
<lastUpdate>dateTime</lastUpdate>
<expiration>dateTime</expiration>
<docDataHash>base64Binary</docDataHash>
<docDataHashAlg>string</docDataHashAlg>
<currSignHashAlg>string</currSignHashAlg>
<sigValidityCondition>ALL or AT_LEAST_ONE or LAST</sigValidityCondition>
<sigsPreservationStatus>
<PreservationInfo>
<sid>string</sid>
<sigStatus xsi:nil="true" />
<extendedValidationEndDate>dateTime</extendedValidationEndDate>
<signingCertSubject>string</signingCertSubject>
<bIsDocTimeStamp>boolean</bIsDocTimeStamp>
<procesStatus>string</procesStatus>
</PreservationInfo>
<PreservationInfo>
<sid>string</sid>
<sigStatus xsi:nil="true" />
<extendedValidationEndDate>dateTime</extendedValidationEndDate>
<signingCertSubject>string</signingCertSubject>
<bIsDocTimeStamp>boolean</bIsDocTimeStamp>
<procesStatus>string</procesStatus>
</PreservationInfo>
</sigsPreservationStatus>
<preservationHistory>
<PreservationRecord>
<id>int</id>
<operationTime>dateTime</operationTime>
<operationType>REGISTER or UPDATE or UNREGISTER or UNKNOWN</operationType>
<operationStatus>int</operationStatus>
<operationStatusInfo>string</operationStatusInfo>
<fileName>string</fileName>
<fileSize>long</fileSize>
<hashIn>string</hashIn>
<hashOut>string</hashOut>
<userComment>string</userComment>
</PreservationRecord>
<PreservationRecord>
<id>int</id>
<operationTime>dateTime</operationTime>
<operationType>REGISTER or UPDATE or UNREGISTER or UNKNOWN</operationType>
<operationStatus>int</operationStatus>
<operationStatusInfo>string</operationStatusInfo>
<fileName>string</fileName>
<fileSize>long</fileSize>
<hashIn>string</hashIn>
<hashOut>string</hashOut>
<userComment>string</userComment>
</PreservationRecord>
</preservationHistory>
<docType>string</docType>
</PreservationInfo>
<DocInfo>
<CreationDateTime>dateTime</CreationDateTime>
<FileName>string</FileName>
<FileSize>long</FileSize>
<ExtSigFileName>string</ExtSigFileName>
<ExtSigFileSize>long</ExtSigFileSize>
<PDFVersion>string</PDFVersion>
<PDFNumOfPages>int</PDFNumOfPages>
<docType>string</docType>
<expiration>dateTime</expiration>
<docDataHash>base64Binary</docDataHash>
<docDataHashAlg>string</docDataHashAlg>
<currSignHashAlg>string</currSignHashAlg>
<globalStatus>string</globalStatus>
<validationProperties>
<ValidationTime>dateTime</ValidationTime>
<CustomValidationTime>boolean</CustomValidationTime>
<IgnoreNoPOE>boolean</IgnoreNoPOE>
<UseClaimedTimeIfNoTS>boolean</UseClaimedTimeIfNoTS>
<DontUseGracePeriodForQCerts>boolean</DontUseGracePeriodForQCerts>
</validationProperties>
<sigInfos>
<SigInfo>
<id>unsignedInt</id>
<sid>string</sid>
<DecisiveMoment>dateTime</DecisiveMoment>
<DecisiveMomentSource>string</DecisiveMomentSource>
<sigTimestamps xsi:nil="true" />
<sigType>string</sigType>
<xmlSignedReferences xsi:nil="true" />
<pdfByteRange xsi:nil="true" />
<hasFurtherChanges>boolean</hasFurtherChanges>
<Reason>string</Reason>
<Location>string</Location>
<Contact>string</Contact>
</SigInfo>
<SigInfo>
<id>unsignedInt</id>
<sid>string</sid>
<DecisiveMoment>dateTime</DecisiveMoment>
<DecisiveMomentSource>string</DecisiveMomentSource>
<sigTimestamps xsi:nil="true" />
<sigType>string</sigType>
<xmlSignedReferences xsi:nil="true" />
<pdfByteRange xsi:nil="true" />
<hasFurtherChanges>boolean</hasFurtherChanges>
<Reason>string</Reason>
<Location>string</Location>
<Contact>string</Contact>
</SigInfo>
</sigInfos>
</DocInfo>
<StatusMessage>string</StatusMessage>
</Preserve_registerResponse>
</soap:Body>
</soap:Envelope>
Output parameters of the method
<Preserve_registerResult>
Return value | Description |
---|---|
Int |
Result of the Preserve_register (document preservation) method. 0 = OK, otherwise see Return codes of all methods and error described in StatusMessage. |
<OutputData>
Return value | Description |
---|---|
Base64Binary |
Data of the preserved document with electronic signatures, encoded in Base64. |
<PreservationInfo>
<CreationDateTime>
Return value | Description |
---|---|
dateTime |
Date and time of creating the report on preserving a document with electronic signatures. |
<docID>
Return value | Description |
---|---|
String |
Unique identifier of the preserved document with electronic signatures. It was generated automatically during the preservation process in the SecuSign service. This identifier can be used with the Preserve_getInfo method to get details of the preserved document. Max. 128 characters. |
<fileName>
Return value | Description |
---|---|
String |
Name of the preserved document with electronic signatures. Max. 260 characters. |
<sortInfo>
Return value | Description |
---|---|
String |
Sorting details – e.g., folder name or structure of nested folders in which the document is registered with the user. Max. 100 characters. |
<lastUpdate>
Return value | Description |
---|---|
dateTime |
Date and time of the last validity and validability extension for the document with electronic signatures. |
<expiration>
Return value | Description |
---|---|
dateTime |
Date and time when the whole document’s validability expire. After this date it will not be possible to validate the signature certificates / seals / time stamps and provide further validability and validity of the document. |
<docDataHash>
Return value | Description |
---|---|
Base64Binary |
Hash of the analyzed document encoded in Base64. The hash calculation algorithm is in the following docDataHashAlg element. |
<docDataHashAlg>
Return value | Description |
---|---|
String |
The hash calculation algorithm for the analyzed document. The format is e.g.: 2.16.840.1.101.3.4.2.1. |
<currSignHashAlg>
Return value | Description |
---|---|
string |
The hash calculation algorithm of the last signature. Example: 2.16.840.1.101.3.4.2.1. |
<sigValidityCondition>
Return value | Description |
---|---|
string |
Selected signature validity conditions at the time it was preserved. Values:
|
<sigsPreservationStatus>
<sid>
Return value | Description |
---|---|
string |
Identifier of the preserved signature registered for the document by the SecuSign service. |
<subindication>
Return value | Description |
---|---|
string |
Signature validation substatus - subindication. It may be one of the following values (According to the ETSI standard [2]):
|
</sigStatus>
<extendedValidationEndDate>
Return value | Description |
---|---|
dateTime |
Date and time until when the signature validability were extended. |
<bISDocTimeStamp>
Return value | Description |
---|---|
boolean |
Specifies whether the signature is a standalone time stamp. |
<procesStatus>
Return value | Description |
---|---|
string |
Signature treatment status at the time of preservation. Values:
|
</PreservationInfo>
</sigsPreservationStatus>
<preservationHistory>
<operationType>
Return value | Description |
---|---|
PreserveOperation |
Type of operation performed. Values:
|
<operationStatusInfo>
Return value | Description |
---|---|
string |
Text statement corresponding to the operation status. |
<docType>
Return value | Description |
---|---|
UNKNOWN |
Unknown document type |
CMSPKCS7 |
Document signed with an internal CMS/PKCS7 signature, e.g. Data messages from the Data Mailbox Information System. |
CMSPKCS7Ext |
Document signed with an external CMS/PKCS7 signature, e.g. Data messages from the Data Mailbox Information System. |
Signed PDF document. |
|
XML |
Signed XML data. |
XML602FORM |
FO/ZFO forms for Software602 Form Filler. |
XMLISDOC |
Signed XML ISDOC data. |
ASiC_S_CAdES |
ASiC-Simple with CAdES signature. |
ASiC_S_XAdES |
ASiC-Simple with XAdES signature. |
ASiC_S_Tst |
ASiC-Simple with Timestamp. |
ASiC_E_CAdES_Tst |
ASiC-Extended with CAdES signature or Timestamp. |
ASiC_E_XAdES |
ASiC-Extended with XAdES signature. |
MS_WORD |
Signed MS Word document. |
MS_EXCEL |
Signed MS Excel document. |
MS_PWR_PNT |
Signed MS PowerPoint document. |
ODF |
Signed OpenDocumentFormat (OpenOffice). |
</PreservationInfo>
<DocInfo>
Element structure is only returned if the input document cannot be registered.
<CreationDateTime>
Return value | Description |
---|---|
dateTime |
Date and time of creating the preservation report. |
<FileName>
Return value | Description |
---|---|
string |
Name of input file (including extension) whose signatures were validated. Max. 260 characters. |
<docType>
Return value | Description |
---|---|
UNKNOWN |
Unknown document type |
CMSPKCS7 |
Document signed with an internal CMS/PKCS7 signature, e.g. Data messages from the Data Mailbox Information System. |
CMSPKCS7Ext |
Document signed with an external CMS/PKCS7 signature, e.g. Data messages from the Data Mailbox Information System. |
Signed PDF document. |
|
XML |
Signed XML data. |
XML602FORM |
FO/ZFO forms for Software602 Form Filler. |
XMLISDOC |
Signed XML ISDOC data. |
ASiC_S_CAdES |
ASiC-Simple with CAdES signature. |
ASiC_S_XAdES |
ASiC-Simple with XAdES signature. |
ASiC_S_Tst |
ASiC-Simple with Timestamp. |
ASiC_E_CAdES_Tst |
ASiC-Extended with CAdES signature or Timestamp. |
ASiC_E_XAdES |
ASiC-Extended with XAdES signature. |
MS_WORD |
Signed MS Word document. |
MS_EXCEL |
Signed MS Excel document. |
MS_PWR_PNT |
Signed MS PowerPoint document. |
ODF |
Signed OpenDocumentFormat (OpenOffice). |
<expiration>
Return value | Description |
---|---|
DateTime |
Date and time when the whole document’s validability expire. After this date it will not be possible to validate the signature certificates and provide further validability, preservation and validity of the document. |
<docDataHash>
Return value | Description |
---|---|
Base64Binary |
Hash of the analyzed document encoded in Base64. The hash calculation algorithm is in the following docDataHashAlg element. |
<docDataHashAlg>
Return value | Description |
---|---|
String |
The hash calculation algorithm for the analyzed document. The format is e.g.: 2.16.840.1.101.3.4.2.1. |
<currSignHashAlg>
Return value | Description |
---|---|
String |
The hash calculation algorithm of the last signature. Example: 2.16.840.1.101.3.4.2.1 |
<globalStatus>
Return value | Description |
---|---|
String |
Sums up the document status based on all its signatures and time stamps. It may be one of the following values:
|
<sigInfos>
<SigInfo>
Signature details (repeated element if there is more than one signature).
<status>
Return value | Description |
---|---|
String |
Resulting signature validation status according to the first version of the ETSI standard[1] concerning validation of PAdES, CAdES, XAdES and ASiC. |
<statusEN>
Return value | Description |
---|---|
String |
Resulting signature validation status according to the current version of the ETSI standard [2] concerning validation of PAdES, CAdES, XAdES and ASiC, see the Indication and subIndication values in Preserve_register/update/getInfo. |
<message>
Return value | Description |
---|---|
string |
Details of signature/seal/timestamp status validation, if available for the status. |
<certType>
Return value | Description |
---|---|
string |
Type of signature/seal/timestamp certificate. It may be one of the following values:
|
<adesType>
Return value | Description |
---|---|
string |
Signature certificate type according to the AdES (Advanced Electronic Signature) standard. |
<eidasType>
Return value | Description |
---|---|
string |
Signature certificate type according to the eIDAS regulation. It may be one of the following values:
|
<baselineType>
Return value | Description |
---|---|
string |
Signature certificate type according to the Baseline profile. It may be one of the following values:
|
<Subject>
Return value | Description |
---|---|
string |
Details from the certificate attribute Subject, e.g.:
|
<IssuerName>
Return value | Description |
---|---|
string |
Name of certificate issuer from CN in the Issuer attribute. |
<Issuer>
Return value | Description |
---|---|
string |
Complete details of certificate issuer from the Issuer attribute. |
<Hash>
Return value | Description |
---|---|
string |
Hash of the certificate’s public key using the SHA256 algorithm. |
<string>
Return value | Description |
---|---|
string |
The qualified certificate issuer’s statement as OID. |
</qcStatements>
<qcType>
Return value | Description |
---|---|
string |
Type of signature/seal/timestamp certificate according to eIDAS, only for QUALIFIED and LEGACY CertType. |
<signCertIsPseudonyme>
Return value | Description |
---|---|
boolean |
Specifies whether the (signature/seal/timestamp) certificate is issued for a pseudonym. |
<certPath>
<Subject>
Return value | Description |
---|---|
string |
Details from the certificate attribute Subject, e.g.:
|
<IssuerName>
Return value | Description |
---|---|
string |
Name of certificate issuer from CN= in the Issuer attribute. |
<Issuer>
Return value | Description |
---|---|
string |
Complete details of certificate issuer from the Issuer attribute. |
<Hash>
Return value | Description |
---|---|
string |
Hash of the certificate’s public key using the SHA256 algorithm. |
<ServiceStatusUri>
Return value | Description |
---|---|
String |
Contains the whole Uri specifying the certificate’s service status on TSL, e.g., http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/granted. |
<ServiceTypeUri>
Return value | Description |
---|---|
String |
Contains the whole Uri specifying the certificate’s service type on TSL, e.g., http://uri.etsi.org/TrstSvc/Svctype/CA/QC. |
<crlPath>
<Type>
Return value | Description |
---|---|
string |
Revocation data type. May be one of the following: CRL, OCSP. |
<Data>
Return value | Description |
---|---|
string |
CRL revocation data in base64 that was used to validate signature/seal/timestamp. |
<Source>
Return value | Description |
---|---|
string |
Revocation data source, may be one of the following values:
|
<DistributionPointChecked>
Return value | Description |
---|---|
boolean |
Specifies whether the CRL distribution point was checked. Not always needed. |
<DistributionPointCheckDate>
Return value | Description |
---|---|
dateTime |
Date and time when the distribution point was checked. |
<DistributionPointThisUpdate>
Return value | Description |
---|---|
dateTime |
Details from the CRL distribution point on the date and time this update was issued. If the CRL for a time stamp was issued before the relevant time, the system checks the DistributionPoint for a newer one and if a newer one is not available, the certificate was not revoked as of the DistributionCheckDate. |
<lastHashAlgOid>
Return value | Description |
---|---|
dateTime |
The last used OID digest algorithm in SignerInfo (CMS, PDF). Example for SHA256 algorithm: 2.16.840.1.101.3.4.2.1. |
<id>
Return value | Description |
---|---|
unsignedInt |
Order number of the signature as it was added to the document. Counting from zero. |
<DecisiveMoment>
Return value | Description |
---|---|
dateTime |
Relevant time is the time as of which we evaluate the given entity (signature/time stamp). It is a Proof of Existence, as of which we validate the entity. If a date and time from a time stamp is not available, ValidationTime (or the current date) will be used. |
<DecisiveMomentSource>
Return value | Description |
---|---|
string |
Information on the origin of the relevant time at which the signature was evaluated. Values:
|
<sigTimestamps>
Optional element, depends on the existence of a time stamp on the signature.
Return value | Description |
---|---|
XML structure |
Details of a time stamp attached as an attribute to a digital signature. The XML data structure as for the parent signature. Which means it contains the SigInfo element, see above, including all its children. Details in the children relate to the time stamp certificate. |
<sigType>
Return value | Description |
---|---|
enum |
Signature type. It may be one of the following values:
|
<xmlSignedReferences>
Optional element, depends on the input file format (only for XML/ZFO).
Return value | Description |
---|---|
XML structure |
Signature data. |
<pdfByteRange>
Optional element, depends on the input file format (only for PDF).
Return value | Description |
---|---|
XML structure |
Byte range of PDF signatures. |