JasperReport http headers in remote xml Datasource



I need to add custom http headers to the XML_URL .


The XML is on different server which needs unique session id in http headers.


I need to pass session-id as parameter and JRXML will add into to remote xml's headers.



application-key: mykey
Accept: application/json
Content-Type: application/json
session-id: myuniqueid123
Cache-Control: no-cache


i am using ireport 5.5 to design ,and jasper-server 5.5 to deploy.


my jrxml



<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://ift.tt/1bXYvZE" xmlns:xsi="http://ift.tt/ra1lAU" xsi:schemaLocation="http://ift.tt/1bXYvZE http://ift.tt/18OQfHh" name="sepPackinglist" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryWithPageHeaderAndFooter="true" uuid="e07e4f56-19e1-4aef-8425-17fb917fe122">
<property name="ireport.zoom" value="0.75"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>

<parameter name="XML_URL" class="java.lang.String">
<defaultValueExpression><![CDATA["http://ift.tt/1tGW5bp"]]></defaultValueExpression>
</parameter>
...........

No comments:

Post a Comment