Method getErrors
This method permits to obtain the list of all errors in a specified language or all languages.
For example if we want obtain the list of all errors in english language the SOAP request will be
Method change password on remote signature
Below an example of change password on remote signer device (RHI3644468199007):
Code Block |
---|
language | xml |
---|
title | REQUESTSOAP-AUTOMATIC/ESEALrequest-changePasswordgetErrors |
---|
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.nam/">
<soapenv:Header/>
<soapenv:Body>
<ser:changePassword>getErrors>
<credentials>
<username>RHI3644468199007</username>
<password>847291742</password>
<idOtp>4872</idOtp>
<otp>876321</otp>
</credentials>
<newPassword>NEWPASSWORD123</newPassword><lang>EN</lang>
</ser:changePassword>getErrors>
</soapenv:Body>
</soapenv:Envelope> |
After this execution the password/PIN of the device signature will be changed from "847291742" (old password) to "NEWPASSWORD123".
Method getCertificate
Below the SOAP request example for obtain the certificate associate to signer device: "SHI7493852568871" In output will obtain a list of all errors in a specified language:
Code Block |
---|
language | xml |
---|
title | SOAP-requestresponse-getCertificategetErrors |
---|
|
<soapenv<soap:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sersoap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getErrorsResponse xmlns:ns2="http://service.ws.nam/">
<soapenv:Header/>
<soapenv:Body>
<return>
<errorCode>0</errorCode>
<errorLanguage>EN</errorLanguage>
<ser:getCertificate>
<errorLanguage2>ENG</errorLanguage2>
<credentials>
<errorText>No errors found</errorText>
</return>
<return>
<username>SHI7493852568871</username>
<<errorCode>1</credentials>errorCode>
</ser:getCertificate>
<<errorLanguage>EN</soapenv:Body>
</soapenv:Envelope> |
The SOAP response will be:
Code Block |
---|
language | xml |
---|
title | SOAP-response-getCertificate |
---|
|
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
errorLanguage>
<ns2:getCertificateResponse xmlns:ns2="http://service.ws.nam/">
<errorLanguage2>ENG</errorLanguage2>
<return>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XeiPjx0gB6J+2+LoXsBAj1KMgHLWZ9NBAqZ7EvvZi3SDcOA1ijtjDRRNbHvI1naV3e/1WlYLEJaAUghNQBYzf2hyv8ikDv1Wb3YGML2ruu5BDAn7YpM0+sMFMmcjU/ImN64L1oLYJJ8d79UqJ0AS5bc+OzbncpTtd5sncvCKWh/xg5Qnc2ZY9djDgk/HhDUqTVRkGLua8gN4=</return> <errorText>Generic error</errorText>
</ns2:getCertificateResponse>
</soap:Body>
</soap:Envelope> |
In the tag "return" there is the base64 associated to the signer device.
Method getAvailableSignatures
Below the SOAP request example for obtain the certificate associate to signer device: "SHI7493852568871"
Code Block |
---|
language | xml |
---|
title | SOAP-request-getAvailableSignatures |
---|
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.nam/">
<soapenv:Header/>
<soapenv:Body>
<ser:getCertificate>
return>
.........................
.........................
.........................
<return>
<credentials><errorCode>1007</errorCode>
<username>SHI7493852568871<<errorLanguage>EN</username>errorLanguage>
</credentials>
<errorLanguage2>ENG</errorLanguage2>
</ser:getCertificate>
</soapenv:Body>
</soapenv:Envelope> |
The SOAP response will be:
Code Block |
---|
language | xml |
---|
title | SOAP-response-getAvailableSignatures |
---|
|
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<errorText>The OTP device was not activated</errorText>
<ns2:getAvailableSignaturesResponse xmlns:ns2="http://service.ws.nam/"> </return>
<return>996413</return><return>
</ns2:getAvailableSignaturesResponse>
</soap:Body>
</soap:Envelope> |
In the tag "return" there is the number of signatures available.
Method getSignatures
Below the SOAP request example for obtain the certificate associate to signer device: "SHI7493852568871"
Code Block |
---|
language | xml |
---|
title | SOAP-request-getSignatures |
---|
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.nam/">
<soapenv:Header/>
<soapenv:Body>
<ser:getSignatures>
<errorCode>1009</errorCode>
<errorLanguage>EN</errorLanguage>
<errorLanguage2>ENG</errorLanguage2>
<errorText>Unavailable attempts for the OTP device</errorText>
</return>
<return>
<errorCode>1016</errorCode>
<errorLanguage>EN</errorLanguage>
<credentials><errorLanguage2>ENG</errorLanguage2>
<username>SHI7493852568871</username><errorText>The OTP device was not associated to the holder</errorText>
</credentials>return>
</serns2:getSignatures>getErrorsResponse>
</soapenv:Body>
</soapenv:Envelope> |
The SOAP response will besoap:Body>
</soap:Envelope> |
With this method is possible to obtain the description associated to a specified error code (in this example 44). Below the example:
Code Block |
---|
language | xml |
---|
title | SOAP-response-getSignatures-request-getErrors-on-specific-errorCode |
---|
|
<soapenv<soap:Envelope xmlns:soapsoapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.nam/">
<soap<soapenv:Header/>
<soapenv:Body>
<ns2:getSignaturesResponse xmlns:ns2="http://service.ws.nam/"><ser:getErrors>
<lang>EN</lang>
<return>3587<<errorCode>44</return>errorCode>
</ns2ser:getSignaturesResponse>getErrors>
</soapsoapenv:Body>
</soapsoapenv:Envelope> |
In the tag "return" there is the number of signatures apposed since the device has been created.
Manage errors in SWS
In this section will be described how manage the errors in SWS and obtain the info about errors.
If the SOAP request is not correct in output will obtain the SOAP response with this structure:
The SOAP response will be:
Code Block |
---|
language | xml |
---|
title | SOAP-request-getErrors-on-specific-errorCode |
---|
|
code |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>Body>
<faultcode>soap:Server</faultcode><ns2:getErrorsResponse xmlns:ns2="http://service.ws.nam/">
<faultstring>Codice OTP errato, riprovare con il prossimo codice</faultstring>
<return>
<detail><errorCode>44</errorCode>
<ns2:WSException xmlns:ns2="http://service.ws.nam/"><errorLanguage>EN</errorLanguage>
<error>44</error><errorLanguage2>ENG</errorLanguage2>
<message>Codice<errorText>Wrong OTP erratocode, try riprovareagain conwith ilthe prossimonext codice<code</message>errorText>
</ns2:WSException>return>
</ns2:getErrorsResponse>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>soap:Body>
</soap:Envelope> |