Getting subreports to run using Web Service Data Adaptor

0

I'm using xml as a datasource using the "Web Service Data Source" data adaptor. I've created a master report which can call the xml resource fine (using soapUI) and I have an other report (call this subreport) which generates against the same xml resource fine. However, when i try to integrate the subreport into the detail band of the master report I get the following error. I'm not sure if it's a bug with the Data Adaptor or something i'm doing wrong.

TIBCOJaspersoftStudioPro-6.1.1.final

java.version=1.7.0_80

Ubuntu 14.04 LTS

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Error creating request
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:511)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:486)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:367)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Error creating request
    at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:878)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:352)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:421)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:396)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2031)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:755)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:262)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:122)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:555)
    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:119)
    at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Error creating request
    at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.createDatasource(WebServiceQueryExecuter.java:184)
    at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.createDatasource(WebServiceQueryExecuter.java:1)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1129)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:437)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:523)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:734)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:58)
    at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:216)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    ... 1 more
Caused by: net.sf.jasperreports.engine.JRException: Error creating request
    at com.jaspersoft.webservice.data.util.WebServiceConnector.createRequestForWs(WebServiceConnector.java:174)
    at com.jaspersoft.webservice.data.util.WebServiceConnector.callWS(WebServiceConnector.java:133)
    at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.createDatasource(WebServiceQueryExecuter.java:172)
    ... 12 more
Caused by: net.sf.jasperreports.engine.JRException: Verb should be POST or GET . is not a valid verb
    at com.jaspersoft.webservice.data.util.WebServiceConnector.createRequestForWs(WebServiceConnector.java:166)
    ... 14 more

tequilamaya's picture
Joined: Sep 24 2015 - 1:26am
Last seen: 3 years 10 months ago

Are you using Master's datasource in your subreport?

hozawa - 3 years 10 months ago

Yes. However, have decided to ditch the Web Service Data Source plugin for the time being due to project time constraints and just use the native Jasper XML Document data adaptor but passing in URL instead of filepath. Not as flexible in some ways but it does work.

tequilamaya - 3 years 10 months ago

1 Answer:

1

To solve this issue, passing this to your sub-report

ParameterName: verbKey

ParameterExpression: $P{verbKey}

Cheers :)

 

 

Balraj's picture
236
Joined: Jan 29 2015 - 7:25pm
Last seen: 2 years 1 month ago
Feedback
randomness