Method for batch signing
The web service enables batch signing. In this method, you need to pass a list of files and their hashes. The hash can be generated using the SignHash method. After the user confirms the signature of the batch in the 602Key application, a signature token is created, which is passed in place of the PIN in calls to the Seal and SignHash methods. The token is passed to the methods in the format Token: [value returned by CreateSigningToken]. When signing using a signature token, specific error codes are returned in addition to the general ones:
-
132 (BATCH_SIGN_TOO_MANY_FILES) – Maximum number of files allowed for batch signing exceeded.
-
133 (BATCH_SIGN_CHECK_FAILED) – Attempt to batch sign a file that does not belong to the batch.
-
134 (BATCH_SIGN_TIMEOUT) – The signing token for batch signing has expired.
Method name: CreateSigningToken
A description of the service including a WSDL schema, and an example request and response for SOAP 1.1 and SOAP 1.2 is located at https://localhost/secusign/default.asmx?op=CreateSigningToken.
Localhost is the name used for the local computer; write the SDK server name/IP address instead (according to the settings in IIS). |
Input parameters of the method
<CertificateID>
[mandatory element]
Input | Description |
---|---|
String |
Certificate identification for signing/sealing. Authorization with 602Key must be set for the certificate. |
<Hash>
[mandatory element]
Input | Description |
---|---|
Base64Binary |
First you need to create an SHA-256 hash/fingerprint of the file. If the result is encoded in hexadecimal format, it must be converted to a binary form and then Base64 encoded. |
<SignedFileInfo>
[mandatory element]
Input | Description |
---|---|
String |
An array of SignedFileInfo structures with information about signed files and their hashes. The maximum number of files in a batch is 100. |
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/CreateSigningToken"
<?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>
<CreateSigningToken xmlns="http://software602.com/secusign/">
<CertificateID>string</CertificateID>
<FileInfo>
<SignedFileInfo>
<FileName>string</FileName>
<Hash>base64Binary</Hash>
<HashAlgorithm>string</HashAlgorithm>
</SignedFileInfo>
<SignedFileInfo>
<FileName>string</FileName>
<Hash>base64Binary</Hash>
<HashAlgorithm>string</HashAlgorithm>
</SignedFileInfo>
</FileInfo>
<Params>string</Params>
</CreateSigningToken>
</soap:Body>
</soap:Envelope>
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>
<CreateSigningTokenResponse xmlns="http://software602.com/secusign/">
<CreateSigningTokenResult>int</CreateSigningTokenResult>
<Token>string</Token>
<StatusMessage>string</StatusMessage>
</CreateSigningTokenResponse>
</soap:Body>
</soap:Envelope>