wiki:XMLRPC/JobsFinish

Version 1 (modified by sander, 8 years ago) (diff)

--

XML-RPC: jobs.finish

When you have converted the document that you received from the jobs.poll call then you need to upload it using jobs.finish. When the result has been saved you will get back the unique ID for the result (an UUID). The signature is as follows:

string jobs.finish(string factory_name, string job, string format, string document);

factory_name (string)
The name of the factory that processed the job.
job (string)
The job ID that was returned by jobs.poll().
format (string)
3-letter code specifying the format of the result (pdf, png or odf).
document (string)
Base64-encoded contents of the result document.

Examples

Calling jobs.finish()

POST /xmlrpc HTTP/1.0
Host: www.officeshots.org
Content-Type: text/xml
Content-Length: 163

<?xml version='1.0'?>
<methodCall>
  <methodName>jobs.finish</methodName>
  <params>
    <param><value><string>My factory</string></value></param>
    <param><value><string>4975c9c6-79a0-43a1-8134-0ba5c0a80105</string></value></param>
    <param><value><string>pdf</string></value></param>
    <params><value><string>UEsDBBQA ... AAAAAA==</string></value></params>
  </params>
</methodCall>

Response to jobs.finish()

HTTP/1.1 200 OK
Date: Fri, 15 May 2009 12:06:12 GMT
Server: Apache/2.2.9 (Debian)
X-Powered-By: PHP/5.2.6-1+lenny3
Set-Cookie: CAKEPHP=1234567890ABCDEF; path=/; secure
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Connection: close
Content-Type: application/xml

<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
  <params>
    <param><value><string>497d9737-a2cc-4682-9d90-0136c0a80105</string></value></param>
  </params>
</methodResponse>