Method name: SealEx
The method SealEx is available for visualizing the inserted electronic signature / seal in a PDF document – for example this means, that the electronic signature / seal will be visible in the PDF file via a signature field (with image) and the user can easily click in the PDF file browser to find out information about the inserted electronic signature / seal. This method also allows you to set the reason and location of signing / sealing.
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=SealEx.
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/Seal"
<?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>
<SealEx xmlns="http://software602.com/secusign/">
<FileName>string</FileName>
<Input>base64Binary</Input>
<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 or EML or MSG or CERTIFICATE</FileType>
<CertificateID>string</CertificateID>
<PrivateKeyPIN>string</PrivateKeyPIN>
<SignatureType>DEFAULT or ENVELOPED or DETACHED or ENCAPSULATE or DETACHED_FROM_HASH</SignatureType>
<Params>string</Params>
<ParamsEx>
<Param>
<Name>string</Name>
<Value>string</Value>
</Param>
<Param>
<Name>string</Name>
<Value>string</Value>
</Param>
</ParamsEx>
</SealEx>
</soap:Body>
</soap:Envelope>
Input parameters of the method
They are basically identical to the Seal method; additionally, it is possible to define the following:
<ParamsEx>
[mandatory element]
<Param>
[mandatory element]
-
Param field always containing a pair of parameters with their name and value.
-
Pairs of Param fields are optional and are listed below each other as they belong together.
<Name>
[optional element]
Input | Description |
---|---|
string |
The name of the input parameter. It can take values:
|
<Value>
[optional element]
Input | Description |
---|---|
string |
The value of the input parameter belonging to the given parameter name. Value for Flags is a combination (sum) of the following flags:
Value for Page can be any page number of the document:
Value for Image must contain base64 encoded image data:
If Value for Text is to be lined, it is possible to use the characters If Value for Text is to be escaped, it is possible to use the character |
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>
<SealExResponse xmlns="http://software602.com/secusign/">
<SealExResult>int</SealExResult>
<Output>base64Binary</Output>
<StatusMessage>string</StatusMessage>
</SealExResponse>
</soap:Body>
</soap:Envelope>
Output parameters of the method
<SealExResult>
Return value | Description |
---|---|
Int |
Result of the SealEx method (document sealing/signing). 0 = OK, otherwise see Return codes of all methods and error described in StatusMessage. |
Sample request of SealEx
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://software602.com/secusign/">
<soapenv:Header/>
<soapenv:Body>
<sec:SealEx>
<sec:FileName>Mini.pdf</sec:FileName>
<sec:Input>Base64BinaryData</sec:Input>
<sec:FileType>PDF</sec:FileType>
<sec:CertificateID>HStore:01ab23cd-45ef-78ab-cd01-2345ef678fed</sec:CertificateID>
<!--Optional:-->
<sec:PrivateKeyPIN/>
<sec:SignatureType>DEFAULT</sec:SignatureType>
<!--Optional:-->
<sec:Params/>
<!--Optional:-->
<sec:ParamsEx>
<!--Zero or more repetitions:-->
<sec:Param>
<sec:Name>Flags</sec:Name>
<sec:Value>3</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>PosX</sec:Name>
<sec:Value>50</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>PosY</sec:Name>
<sec:Value>-50</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>SizeX</sec:Name>
<sec:Value>150</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>SizeY</sec:Name>
<sec:Value>50</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>Text</sec:Name>
<sec:Value>This is the signature text</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>Image</sec:Name>
<sec:Value>Base64:Base64BinaryData</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>Reason</sec:Name>
<sec:Value> I am the author of this document.</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>Location</sec:Name>
<sec:Value>Hornokrčská 15, Praha 4, 140 00, CZ</sec:Value>
</sec:Param>
<sec:Param>
<sec:Name>Contact</sec:Name>
<sec:Value>Contact us at info@602.cz</sec:Value>
</sec:Param>
</sec:ParamsEx>
</sec:SealEx>
</soapenv:Body>
</soapenv:Envelope>