XMLRPC: jobs.poll

« index

 Find a job that matches any of the applications on a given factory and lock it


 - factory_name (string): The name of the factory that you want to poll for

 Return value
 When a job is found that matches any of the workers that are running on the
 requested factory then an array will be returned containing the following fields:

 - job (string): The GUID of the job
 - application (string): The name of the application to run, e.g. "OpenOffice.org Writer"
 - version (string): The version string of the application, e.g. "3.0" or "2003 SP2"
 - pageStart (int): The first page to render in the output
 - pageEnd (int): The last page to render in the output. If this is zero then it should be
                  rendered to the end of the document.
 - format (string): 3-letter code specifying the desired output format (pdf, png or odf). If this
                    is empty then the factory can decide.
 - filename (string): The original filename of the ODF document
 - doctype (string): 3-letter code specifying the input type (odt, ods, odp)
 - document (string): Base64-encoded contents of the document

 When no mathcing job has been found then an empty result is returned.

 Job locking
 The matching job is locked for five minutes. This is to make sure that no jobs are processed by two factories at
 the same time. If your factory takes longer to process a job, it is possible that somebody else will lock it. In
 this case, your upload will fail.

 Example request
 POST /xmlrpc HTTP/1.0
 Host: example.org
 Content-Type: text/xml
 Content-Length: 193

 <?xml version='1.0'?>
     <param><value><string>My factory</string></value></param>

 Example response
 HTTP/1.1 200 OK
 Content-Type: application/xml
 Content-Length: 10164
 Connection: close

 <?xml version="1.0" encoding="iso-8859-1"?>
             <value><string>OpenOffice.org Writer</string></value>
             <value><string>UEsDBBQA ... AAAAAA==</string></value>