gwhitaker Posted June 19, 2013 Share Posted June 19, 2013 I'm currently trying to schedule a job using the REST api for Jasper Server 5.1 (community and pro) and as a result of uploading what appears to be a valid job descriptor:<job> <baseOutputFilename>AllAccounts</baseOutputFilename> <description>sample</description> <label>sample</label> <outputFormats>PDF</outputFormats> <outputLocale></outputLocale> <parameters> <name>REPORT_TIME_ZONE</name> <value xsi:type='xs:string' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>Australia/Sydney</value> </parameters> <repositoryDestination> <folderURI>/public/Samples/Reports</folderURI> <outputDescription></outputDescription> <overwriteFiles>false</overwriteFiles> <sequentialFilenames>false</sequentialFilenames> <version>0</version> </repositoryDestination> <simpleTrigger> <startDate>2013-06-19T07:29:52+10:00</startDate> <timezone>Australia/Sydney</timezone> <version>0</version> <occurrenceCount>1</occurrenceCount> </simpleTrigger> <version>0</version></job> Performing a PUT ( scheduling a new job) or downloading a manually scheduled job descriptor and performing a POST to the jasperserver-pro/rest/job/ endpoint, results in the following 400 bad request message: please check the request job descriptor Because the JAXB conversion is surpressing the error message I'm unable to see what is wrong with my job descriptor being uploaded. As mentioned I've tried creating a job descriptor identified in http://community.jaspersoft.com/sites/default/files/docs/jasperreports-server-web-services-guide_1.pdf as well as downloading an existing scheduled job and just reuploading in the manner described in the web service guide and both result in the same error. Require assistance in identifying what I'm doing wrong. Link to comment Share on other sites More sharing options...
felipegdr Posted September 16, 2013 Share Posted September 16, 2013 I don't see a source seciont in your job descriptor. In this section you indicate the uri from the report source, as well as any parameters you want to pass to the server: <source><reportUnitURI>/path/to/report</reportUnitURI><parameters><entry><key>PARAM_KEY</key><value>PARAM_VALUE</value></entry></parameters></source>[/code] Link to comment Share on other sites More sharing options...
felipegdr Posted September 16, 2013 Share Posted September 16, 2013 sorry I couldn't get the xml format to work.... Link to comment Share on other sites More sharing options...
ramu_1 Posted April 4, 2018 Share Posted April 4, 2018 Hello, In your xml descriptor file you haven't specified the source resource URI and output format should be added with in one more tag. I have tried the below xml and it worked for me.<job><baseOutputFilename>AllAccounts</baseOutputFilename><description>sample</description><label>sample</label><outputFormats><outputFormat>HTML</outputFormat></outputFormats><outputLocale></outputLocale><source><reportUnitURI>/public/Samples/Reports/13g.TopFivesReport</reportUnitURI></source><repositoryDestination><folderURI>/public/Samples/Reports</folderURI><outputDescription></outputDescription><overwriteFiles>false</overwriteFiles><sequentialFilenames>false</sequentialFilenames><version>0</version></repositoryDestination><simpleTrigger><startDate>2018-04-04T17:28:03.598+05:30</startDate><timezone>Asia/Calcutta</timezone><version>0</version><occurrenceCount>1</occurrenceCount></simpleTrigger><version>0</version></job> Link to comment Share on other sites More sharing options...
ramu_1 Posted April 4, 2018 Share Posted April 4, 2018 Hello, In your xml descriptor file you haven't specified the source resource URI and output format should be added with in one more tag. I have tried the below xml and it worked for me.<job><baseOutputFilename>AllAccounts</baseOutputFilename><description>sample</description><label>sample</label><outputFormats><outputFormat>HTML</outputFormat></outputFormats><outputLocale></outputLocale><source><reportUnitURI>/public/Samples/Reports/13g.TopFivesReport</reportUnitURI></source><repositoryDestination><folderURI>/public/Samples/Reports</folderURI><outputDescription></outputDescription><overwriteFiles>false</overwriteFiles><sequentialFilenames>false</sequentialFilenames><version>0</version></repositoryDestination><simpleTrigger><startDate>2018-04-04T17:28:03.598+05:30</startDate><timezone>Asia/Calcutta</timezone><version>0</version><occurrenceCount>1</occurrenceCount></simpleTrigger><version>0</version></job> Link to comment Share on other sites More sharing options...
ramu_1 Posted April 4, 2018 Share Posted April 4, 2018 '' Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now