Oracle Reports installation provides a sample RWWebServiceUtil webservice testing utility class. This is available in ORACLE_HOME /reports/jlib/rwrun.jar. RWWebServiceUtil can be used to test various operations supported by RWWebService.
The following procedure outlines the necessary steps involved in using this utility:
Include rwrun.jar in the classpath.
Run RWWebServiceUtil as a normal java program as following:
$ORACLE_HOME\jdk\bin\java oracle.reports.rwclient.RWWebServiceUtil
It displays the following usage:
-endpoint url of the webservice
-method web service operation to invoke
runJob,getJobInfo,getServerInfo,killJob,getAPIVersion
Input Parameters for runJob
-cmdline command line to be used while submitting the job
-sync boolean value to specify if job should be submitted
in synchronous manner or asynchronous manner
Input Parameters for getJobInfo
-server server to be used for processing the request
-jobid jobid in numeric format
-authid user/password for authentication, if server is secure
Input Parameters for getServerInfo
-server server to be used for processing the request
-authid authid for authentication, if server is secure
Input Parameters for killJob
-server server to be used for processing the request
-jobid jobid in numeric format
-authid authid for authentication, if server is secure
You can use this utility to submit jobs to reports server using the following command:
$ORACLE_HOME\jdk\bin\java oracle.reports.rwclient.RWWebServiceUtil -endpoint http://yourmachine:port/reports/rwwebservice -method runjob -cmdline "report=test.rdf desformat=pdf destype=file desname=/tmp/output.pdf server=ReportsServer" -sync true
This submits the request to the server and returns a soap response in the following format:
<?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
<serverQueues>
<job id="2" queueType="past">
<name>/home/vnanda/test.rdf</name>
<type>report</type>
<status code="4">Report finished successfully.</status>
<owner>RWUser</owner>
<server>reportsserver</server>
<destination>
<desType>file</desType>
<desName>/tmp/output.pdf</desName>
<desFormat>pdf</desFormat>
<file>output1.pdf</file>
</destination>
<timingInfo>
<queued>Feb 17, 2009 9:41:36 AM</queued>
<started>Feb 17, 2009 9:41:36 AM</started>
<finished>Feb 17, 2009 9:41:38 AM</finished>
</timingInfo>
</job>
</serverQueues>
Similarly, you can invoke other operations on RWWebService using the RWWebServiceUtil.