Running pdfaPilot via Webservices (SOAP)

It is possible to submit jobs to a pdfaPilot instance and retrieve the results via SOAP requests.

In order to do so you first have to start the pdfaPilot in a "listening mode":

./pdfaPilot --satellite --port=<any free port number, e.g. 1201>
Click to copy

Or on Windows:

.\pdfPilot.exe --satellite --port=<any free port number, e.g. 1201>
Click to copy

It is currently not possible to submit PDF files or kfpx Profiles via such SOAP requests, so both have to be available to pdfaPilot on mounted volumes.

The SOAP requests wrap any command line parameters in <ns:args> tags. The simple requests  below asks pdfaPilot to send usage information back by submitting the --help parameter:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:ns="http://callassoftware.com/cws.xsd">
 <SOAP-ENV:Body>
  <ns:extExecute>
   <ns:args>
    <ns:userID></ns:userID>
    <ns:args>--help</ns:args>
   </ns:args>
  </ns:extExecute>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Click to copy

You may include as many parameters as required, there is no limitation.

Any results will be sent back in XML back to the program that you have used to send the request.

You may use the curl tool on command line to send requests and retrieve results:

curl -H "Content-Type: text/xml; charset=utf8" -d@.\ns.extExecute_help.req.xml http://<pdfaPilot' IP>:<Port>
Click to copy

A Web Service Defintion Language file can be found in the pdfaPilot program folder:

The example below is a simple SOAP request that asks pdfaPilot to create single pages from the original PDF file. Path and name of the PDF need of course to be adapted.