Jump to content
Changes to the Jaspersoft community edition download ×

pass XML with service request?


Recommended Posts

How do I pass XML with the report service request to JasperServer? (rather than predefining a datasource) I would like to construct XML on the fly, pass it to JasperServer in the request, and receive a PDF. I have JRXML reports (created by iReport) in my repository already -- they are configured to an XML datasource. Thoughts?


<request operationName="runReport" locale="en">
<argument name="RUN_OUTPUT_FORMAT">PDF</argument>
<resourceDescriptor name="" wsType="" uriString="XMLReport" isNew="false">


thanks in advance, john


Link to comment
Share on other sites

  • 2 years later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic


Thanks for your reply;

Except for the official documentation shipped with jasperserver, and the offficial documentation we bought (all J-ultimate Guides), studied in depth, which however "only" show, cite, state examples of custom datasources, I were not able to locate any ressources, like downloadable code-examples of or ready to use custom datasources for the described specific task?

Could you point me towards such a ressource?

I feel such add-on downloads (supported or not) would add an incredible benefit supporting the proliferation of the product.

Me feels that iReport with its wast datasources, meanwhile is way ahead of JS, which IMHO should not necessary be the case.

Suggestion: setup a wiki-page describing howto "migrate" iReport DataSources to JasperServer?

Thanks upfront,

regards Georg




Link to comment
Share on other sites


I solved the task, without the need of a new custom datasource, the following way.
hth someone searching the archives later on;
regards Georg

a) added xpath2 functionality to jasperserver 3.5 see:
see http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=68744

b) used a java.lang.String input parameter, which ist then taken over by the org.w3c.dom.Document XML_DATA_DOCUMENT;
within the main report I used something like:
<parameter name="XML_DATA" class="java.lang.String">
<parameter name="XML_DATA_DOCUMENT" class="org.w3c.dom.Document" isForPrompting="false">
    <defaultValueExpression><![CDATA[net.sf.jasperreports.engine.util.JRXmlUtils.parse(new org.xml.sax.InputSource(new java.io.StringReader($P{XML_DATA})))]]></defaultValueExpression>
<queryString language="xpath2">


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...