Revision as of 13:26, 19 September 2008
KiDocExchange Web Service
Introduction
KiDocExchange is a web service for uploading files into Krediidiinfo server. Web Service description can be found on http://services.krediidiinfo.ee/KiDocExchange.wsdl.
Sequence Diagram
Next squence diagram illustrates how to use KiDocExchange to upload files.
Methods
startUpload
Starts and initializes file upload.
|
|
Name
|
Type
|
Description
|
| Input Parameter:
|
fileName
|
xs:string
|
The name of file
|
| Output Parameter:
|
docID
|
xs:integer
|
Unique file identification number in Krediidiinfo server.
|
uploadChunk
Uploads and appends next chunk of data. Servers can send data in one chunk. Several chunks are needed when upload process is slow and there are a progress feedback needed (desktop application).
|
|
Name
|
Type
|
Description
|
| Input Parameters:
|
docID
|
xs:integer
|
File identification number
|
|
|
chunk
|
xs:base64Binary
|
Next chunk of data
|
| Output Parameters:
|
|
|
None
|
finishUpload
Finishes file upload.
|
|
Name
|
Type
|
Description
|
| Input Parameters:
|
docID
|
xs:integer
|
File identification number
|
|
|
md5
|
xs:string
|
MD5 checksum of uploaded file
|
| Output Parameters:
|
errorCode
|
xs:integer
|
If 0 then file upload succeeded. If negative then there was an error. See Error Codes for more information.
|
getStatusCode
Returns the status code of uploaded file
|
|
Name
|
Type
|
Description
|
| Input Parameters:
|
docID
|
xs:integer
|
File identification number
|
| Output Parameters:
|
status_code
|
xs:integer
|
File status code:
|
|
|
0
|
File has been processed
|
|
|
2
|
Uploading in progress
|
|
|
3
|
File is in processing
|
|
|
4
|
File was successfully uploaded and is waiting for processing
|
|
|
-1
|
Unknown error. Contact Krediidiinfo for more information. You might get usefull information with getStatusMsg method.
|
|
|
-10003
|
MD5 check failed
|
|
|
-xxxxx
|
File processing failed. Contact Krediidiinfo for more information. You might get usefull information with getStatusMsg method.
|
getStatusMsg
Returns the status message of uploaded file.
|
|
Name
|
Type
|
Description
|
| Input Parameters:
|
docID
|
xs:integer
|
File identification number
|
| Output Parameters:
|
statusMsg
|
xs:string
|
Status message of the file
|
Error Codes
| Code |
Description |
| 0 |
Success |
|
Request was processed successfully. |
| -10001 |
Access denied |
|
You are trying to access file owned by somebody else. |
| -10002 |
File does not exists |
|
You are using file identification that does not exist |
| -10003 |
MD5 failure |
|
Your sent MD5 does not match MD5 calculated by server |