Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to Get Report Content via Actuate Web Services?
dhydrated
I'm trying out Actuate Web Services to execute a report and to get report content but did not manage to get it working.<br />
<br />
Right now I'm stuck at calling Exectute Report web services based on this wsdl file
Find more posts tagged with
Comments
dhydrated
I managed to make a successful call of 'ExecuteReport'. The problem with above request is the "RequestedOutputFile" must have rptdocument suffix. Below are my successful call SOAP request and response.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
//SOAP Request
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header><AuthId soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">cfMOutp7qK/+tlWjrUeUqJTUvIaplDyKmbVx6KtWPA8mAWZLLDlpTM+rJ9k1SFg45pC27sjWcgd3A9xrgaO3eHqxOp4vUPab8i7AmvF2Iu5sUW/do6TkFczYD8fVpYky</AuthId><Locale soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">en_US</Locale><TargetVolume soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">birt_poc</TargetVolume><DelayFlush soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0"/>
</soapenv:Header>
<soapenv:Body>
<ExecuteReport xmlns="http://schemas.actuate.com/actuate11">
<JobName>Default JobName</JobName>
<InputFileName>/report/SampleBIRTReport.rptdesign</InputFileName>
<SaveOutputFile>true</SaveOutputFile>
<RequestedOutputFile><Name>/output/SampleBIRTReport.rptdocument</Name></RequestedOutputFile>
</ExecuteReport>
</soapenv:Body>
</soapenv:Envelope>
//SOAP Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns="http://schemas.actuate.com/actuate11"><ConnectionHandle>bAq+y9HJrv5y7XC/gX7MO721WvOI/w6jmbZwg7PYF19Cq3057d+JTeUKSSPpu8CJLs/vLcVmgwbacidRHs5pK1SOotwH+YM0stujUE9ZOBrqcJ01s/ybRrWxGmNNAsacwb62p5TwDMgmAWZLLDlpTCvAwLvpauUGFYyM9xo55rGP8xNrQWJDwmg7DqFU5Ov9q0Arbb6SLPrBrgAEc9alqAKwrcPOZ2ccHexLLSVL/Eg1UnXF1X+m2y9cQ8brQB9glBYUTKrT93rG15PvnmUFlg==</ConnectionHandle>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ACTU:ExecuteReportResponse xmlns:ACTU="http://schemas.actuate.com/actuate11" xmlns="http://schemas.actuate.com/actuate11">
<Status>FirstPage</Status>
<ObjectId>320500000100</ObjectId>
<OutputFileType>RPTDOCUMENT</OutputFileType>
<ConnectionHandle>bAq+y9HJrv5y7XC/gX7MO721WvOI/w6jmbZwg7PYF19Cq3057d+JTeUKSSPpu8CJLs/vLcVmgwbacidRHs5pK1SOotwH+YM0stujUE9ZOBrqcJ01s/ybRrWxGmNNAsacwb62p5TwDMgmAWZLLDlpTCvAwLvpauUGFYyM9xo55rGP8xNrQWJDwmg7DqFU5Ov9q0Arbb6SLPrBrgAEc9alqAKwrcPOZ2ccHexLLSVL/Eg1UnXF1X+m2y9cQ8brQB9glBYUTKrT93rG15PvnmUFlg==</ConnectionHandle>
</ACTU:ExecuteReportResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</pre>
dhydrated
Now I'm stuck at getting the report content based on this SelectPage wsdl
johnw
Example use of SelectPage:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>ViewParameter param = new ViewParameter();
param.setFormat(RunReportsAC10.PDF);
SelectPage requestPage = new SelectPage();
requestPage.setViewParameter(param);
requestPage.setDownloadEmbedded(true);
String objectName = RunReportsAC10.RESULT_FOLDER + currentFile.getName();
ObjectIdentifier objectID = new ObjectIdentifier();
objectID.setName(objectName);
objectID.setType(RunReportsAC10.RPTDOCUMENT);
requestPage.setObject(objectID);
GetPageCount getPageCount = new GetPageCount();
getPageCount.setObject(objectID);
GetPageCountResponse pageCount = proxy.getPageCount(getPageCount);
PageIdentifier pageRange = new PageIdentifier();
pageRange.setRange("1-" + pageCount.getPageCount());
requestPage.setPage(pageRange);
SelectPageResponse pageResponse = proxy.selectPage(requestPage);
byte[] attachment = pageResponse.getPageRef().getContentData();
RunReportsAC10.writeOutput(outputFileName + ".pdf", attachment);
</pre>