Running, printing, and viewing a document : Working with a large message
 
Working with a large message
The Information Delivery API supports two ways to send and receive a message such as a report response:
*Embed the data in the SOAP body.
*Attach the data to a SOAP request or response.
If you use HTTP 1.0, you typically choose to embed the data in the SOAP message as a single block and send the block in an uninterrupted data stream. If you use HTTP 1.1, you can send the data as an attachment to improve performance on BIRT iHub and the network.
To download or upload a file, you indicate whether to embed the data in the response or send the data as an attachment by setting the DownloadEmbedded option to True or False. The following example shows a SOAP request to download a file with the content embedded in the body of the response:
<SOAP-ENV:Body>
<DownloadFile xmlns="http://schemas.actuate.com/actuate11">
<FileName>/report/SampleReport.rptdesign</FileName>
<DecomposeCompoundDocument>
false
</DecomposeCompoundDocument> <DownloadEmbedded>true</DownloadEmbedded>
</DownloadFile>
</SOAP-ENV:Body>
The following example shows the SOAP response with the content of the file embedded in the message:
<SOAP-ENV:Body
<ACTU:DownloadFileResponse
<File>
<Id>8</Id>
<Name>/report/SampleReport.rptdesign</Name>
<FileType>RPTDESIGN</FileType>
<Version>1</Version>
<TimeStamp>2008-04-11T19:02:43</TimeStamp>
<Owner>Administrator</Owner>
<UserPermissions>VSRWEDG</UserPermissions>
<PageCount>0</PageCount>
<Size>47104</Size>
</File>
<Content>
<ContentId>SampleReport.rptdesign</ContentId>
<ContentType>Application/Octet-Stream</ContentType>
<ContentData>
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPg
</ContentData>
</Content>
</ACTU:DownloadFileResponse>
</SOAP-ENV:Body>
The following example shows a SOAP request to download a file with the file sent as an attachment:
<SOAP-ENV:Body>
<DownloadFile xmlns="http://schemas.actuate.com/actuate11">
<FileName>/report/SampleReport.rptdesign</FileName>
<DecomposeCompoundDocument>
false
</DecomposeCompoundDocument>
<DownloadEmbedded>false</DownloadEmbedded>
</DownloadFile>
</SOAP-ENV:Body>
The following example shows a multi-part response with the MIME boundary and content type defined in the HTTP header and the file placed outside the SOAP envelope as an attachment:
HTTP/1.0 200 OK
Content-Type:
Multipart/Related;boundary=Mime_boundary;
type="text/xml";
start="<response.xml>"HOST:ENL2509Connection:
closeSOAPAction:
""--Mime_boundaryContent-Type: text/xml;
charset=utf-8Content-Transfer-Encoding:8bitContent-ID:
<response.xml>
<?xml version='1.0' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=
"http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header

</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ACTU:DownloadFileResponse>
<File>
<Id>8</Id>
<Name>/report/SampleReport.rptdesign</Name>
<FileType>RPTDESIGN</FileType>
<Version>1</Version>
<TimeStamp>2008-04-11T19:02:43</TimeStamp>
<Owner>Administrator</Owner>
<UserPermissions>VSRWEDG</UserPermissions>
<PageCount>0</PageCount>
<Size>47104</Size>
</File>
<Content>
<ContentId>SampleReport.rptdesign</ContentId>
<ContentType>
Application/Octet-Stream
</ContentType>
</Content>
</ACTU:DownloadFileResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--Mime_boundaryContent-Type:
Application/Octet-StreamContent-Transfer-Encoding:
binaryContent-ID:SampleReport.rptdesign