Skip to main content
Version: 2.2.2

downloadEletronicFile

This method allows downloading an electronic file. To use it, it is necessary to follow the standard documented below:

Java class
Requestweb/wwwroot/ws/java/document/DownloadEletronicFileRequestType.java
Returnweb/wwwroot/ws/java/document/DownloadEletronicFileResponseType.java

Request:

ID #RequiredDescription
IDDOCUMENTXDocument ID #.
IDREVISIONRevision ID #.
IDUSERStarting with version 2.0, this parameter became obsolete. During the import, leave it blank.
FGCONVERTOPDFEnter 1 to download the file in pdf, if it exists; otherwise, the original file is downloaded.
IDCATEGORYDocument category ID #.
FGWATERMARKEnter the value 1 to download the file with watermark.
Note: Only for PDF files.
NMFILEFile name with extension.
FGFILELINKEnter 1 to return the link instead of the file.

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:document">
<soapenv:Header/>
<soapenv:Body>
<urn:downloadEletronicFile>
<!--You may enter the following 8 items in any order-->
<urn:iddocument>?</urn:iddocument>
<urn:idrevision>?</urn:idrevision>
<urn:iduser>?</urn:iduser>
<urn:fgconverttopdf>?</urn:fgconverttopdf>
<urn:idcategory>?</urn:idcategory>
<urn:fgwatermark>?</urn:fgwatermark>
<urn:nmfile>?</urn:nmfile>
<urn:fgfilelink>?</urn:fgfilelink>
</urn:downloadEletronicFile>
</soapenv:Body>
</soapenv:Envelope>

Return:

ID #Description
returnSUCCESS: Returns a vector with the metadata:
â–ª NMFILE: String; File name.
â–ª BINFILE: Byte[]; File content.
FAILURE: returns a vector with the metadata:
â–ª ERROR: String; 0: Message with error.