Jump to content
We've recently updated our Privacy Statement, available here ×

cialowicz

Members
  • Posts

    3
  • Joined

  • Last visited

cialowicz's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I've tried fiddling with the XML, but still no luck. Misery, I tell you... =/ Post Edited by cialowicz at 05/22/2009 13:44
  2. I was able to figure out how to run reports, download files, list folders, etc. on a JasperServer using Python with SOAPpy and xml.dom minidom. Here's an example execute report request, which works: repositoryURL = 'http://user@pass:myjasperserver:8080/jasperserver/services/repository' repositoryWSDL = repositoryURL + '?wsdl' server = SOAPProxy(repositoryURL, repositoryWSDL) print server._ns(repositoryWSDL).runReport(''' <request operationName="runReport" locale="en"> <argument name="RUN_OUTPUT_FORMAT">PDF</argument> <resourceDescriptor name="" wsType="" uriString="/reports/baz"> <label>null</label> <parameter name="foo">bar</parameter> </resourceDescriptor> </request> ''') However, I'm having trouble formatting my requests properly for the "ReportScheduler" section of the server. I've consulted the documentation located here (jasperforge.org/espdocs/docsbrowse.php), and have tried model my requests after their samples with no luck (see page 27). Here are two examples that I've tried, which both return the same error: schedulingURL = 'http://user@pass:myjasperserver:8080/jasperserver/services/ReportScheduler' schedulingWSDL = schedulingURL + '?wsdl' server = SOAPProxy(schedulingURL, schedulingWSDL) # first request print server._ns(schedulingWSDL).scheduleJob(''' <request operationName="scheduleJob" locale="en"> <job> <reportUnitURI>/reports/baz</reportUnitURI> <label>baz</label> <description>baz</description> <simpleTrigger> <startDate>2009-05-15T15:45:00.000Z</startDate> <occurenceCount>1</occurenceCount> </simpleTrigger> <baseOutputFilename>baz</baseOutputFilename> <outputFormats> <outputFormats>PDF</outputFormats> </outputFormats> <repositoryDestination> <folderURI>/reports_generated</folderURI> <sequentialFilenames>true</sequentialFilenames> <overwriteFiles>false</overwriteFiles> </repositoryDestination> <mailNotification> <toAddresses>my@email.com</toAddresses> <subject>test</subject> <messageText>test</messageText> <resultSendType>SEND_ATTACHMENT</resultSendType> </mailNotification> </job> </request>''') # second request (trying different format here) print server._ns(schedulingWSDL).scheduleJob(''' <ns1:scheduleJob soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://www.jasperforge.org/jasperserver/ws"> <job xsi:type="ns1:Job"> <reportUnitURI xsi:type="xsd:string">/reports/baz</reportUnitURI> <username xsi:type="xsd:string" xsi:nil="true"/> <label xsi:type="xsd:string">baz</label> <description xsi:type="xsd:string">baz</description> <simpleTrigger xsi:type="ns1:JobSimpleTrigger"> <timezone xsi:type="xsd:string" xsi:nil="true"/> <startDate xsi:type="xsd:dateTime">2008-10-09T09:25:00.000Z</startDate> <endDate xsi:type="xsd:dateTime" xsi:nil="true"/> <occurrenceCount xsi:type="xsd:int">1</occurrenceCount> <recurrenceInterval xsi:type="xsd:int" xsi:nil="true"/> <recurrenceIntervalUnit xsi:type="ns1:IntervalUnit" xsi:nil="true"/> </simpleTrigger> <calendarTrigger xsi:type="ns1:JobCalendarTrigger" xsi:nil="true"/> <parameters soapenc:arrayType="ns1:JobParameter[4]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> </parameters> <baseOutputFilename xsi:type="xsd:string">test</baseOutputFilename> <outputFormats soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <outputFormats xsi:type="xsd:string">PDF</outputFormats> </outputFormats> <outputLocale xsi:type="xsd:string" xsi:nil="true"/> <repositoryDestination xsi:type="ns1:JobRepositoryDestination"> <folderURI xsi:type="xsd:string">/reports_generated</folderURI> <sequentialFilenames xsi:type="xsd:boolean">false</sequentialFilenames> <overwriteFiles xsi:type="xsd:boolean">false</overwriteFiles> </repositoryDestination> <mailNotification xsi:type="ns1:JobMailNotification" xsi:nil="true"/> </job> </ns1:scheduleJob>''') Each of these requests result in errors: SOAPpy.Types.faultType: <Fault soapenv:Server.userException: org.xml.sax.SAXException: Bad types (class java.lang.String -> class com.jaspersoft.jasperserver.ws.scheduling.Job): <SOAPpy.Types.structType detail at 14743952>: {'hostname': 'myhost'}> Any help/guidance would be appreciated. Thank you.
×
×
  • Create New...